Extract city and country mentions from Text like GeoText without regex, but FlashText, a Aho-Corasick implementation.

Overview

Build Status Coverage


flashgeotext 🌍

Extract and count countries and cities (+their synonyms) from text, like GeoText on steroids using FlashText, a Aho-Corasick implementation. Flashgeotext is a fast, batteries-included (and BYOD) and native python library that extracts one or more sets of given city and country names (+ synonyms) from an input text.

documentation: https://flashgeotext.iwpnd.pw/
introductory blogpost: https://iwpnd.pw/articles/2020-02/flashgeotext-library

Usage

from flashgeotext.geotext import GeoText

geotext = GeoText()

input_text = '''Shanghai. The Chinese Ministry of Finance in Shanghai said that China plans
                to cut tariffs on $75 billion worth of goods that the country
                imports from the US. Washington welcomes the decision.'''

geotext.extract(input_text=input_text)
>> {
    'cities': {
        'Shanghai': {
            'count': 2,
            'span_info': [(0, 8), (45, 53)],
            'found_as': ['Shanghai', 'Shanghai'],
            },
        'Washington, D.C.': {
            'count': 1,
            'span_info': [(175, 185)],
            'found_as': ['Washington'],
            }
        },
    'countries': {
        'China': {
            'count': 1,
            'span_info': [(64, 69)],
            'found_as': ['China'],
            },
        'United States': {
            'count': 1,
            'span_info': [(171, 173)],
            'found_as': ['US'],
            }
        }
    }

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

pip:

pip install flashgeotext

conda:

conda install flashgeotext

for development:

git clone https://github.com/iwpnd/flashgeotext.git
cd flashgeotext/
poetry install

Running the tests

poetry run pytest . -v

Authors

  • Benjamin Ramser - Initial work - iwpnd

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Demo Data cities from http://www.geonames.org licensed under the Creative Commons Attribution 3.0 License.

Acknowledgments

Comments
  • Cannot install 0.3.0 or 0.3.1

    Cannot install 0.3.0 or 0.3.1

    Hi:

    I try to install flashgeotext 0.3.1 via pip or pipenv but i get the following error:

    COMAND: pipenv iinstall flashgeotext~=0.3.0

    ERROR: ERROR: Could not find a version that satisfies the requirement flashgeotext~=0.3.0 ERROR: No matching distribution found for flashgeotext~=0.3.0

    How can i solve it?

    Thanks in advance. Best.

    opened by LuciaTajuelo 6
  • Publishing package on conda-forge

    Publishing package on conda-forge

    Hi @iwpnd, this is a great package! Unfortunately, it is not available on conda-forge while flashtext can be found. I'm building a library around it and I can only fetch packages from conda-forge so I'm wondering if you might accept PR to publish on conda-forge eventually. For now the workaround is to embed all flashgeotext as a module statically but I would love to declare it in the dependencies.

    opened by francbartoli 6
  • seem debugging will cause some fatal errors

    seem debugging will cause some fatal errors

    image Hello, your method helps me a lot, and I just wanna debug at some point, but much to my suprise, it will show some fatal errors once debug, how can we solve this probelm image image

    opened by BriskyGates 5
  • Missing cities and countries

    Missing cities and countries

    Hello,

    I have started trying out this library, but it seems to be missing cities and countries mostly from South America. What's the best way to update the cities.json and countries.json files? Is it ok just to add the data in there manually?

    Also, how can this library map Shanghai as China, where is that relation mapped? why does it not behave the same for Caracas?

    >>> geotext.extract(input_text="Living in Caracas", span_info=True)
    {'cities': {'Caracas': {'count': 1, 'span_info': [(10, 17)]}}, 'countries': {}}
    

    Thanks in advance!

    enhancement 
    opened by pythobot 5
  • chore(deps-dev): bump awscli from 1.25.67 to 1.25.68

    chore(deps-dev): bump awscli from 1.25.67 to 1.25.68

    Bumps awscli from 1.25.67 to 1.25.68.

    Changelog

    Sourced from awscli's changelog.

    1.25.68

    • api-change:identitystore: Documentation updates for the Identity Store CLI Reference.
    • api-change:sagemaker: This release adds HyperParameterTuningJob type in Search API.
    Commits
    • 5df5380 Merge branch 'release-1.25.68'
    • 5a9ece8 Bumping version to 1.25.68
    • 2d83b15 Update changelog based on model updates
    • aa1b1b1 Merge branch 'release-1.25.67' into develop
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • TypeError: slice indices must be integers or None or have an __index__ method when span_info is False

    TypeError: slice indices must be integers or None or have an __index__ method when span_info is False

    As per the doc https://flashgeotext.iwpnd.pw/geotext/, the GeoText Class python function extract has an optional argument span_info : bool - return span_info. Defaults to True. However, on passing the span_info argument as false, GeoText fails to parse the text and throws an index slice error.

    Below are the steps to reproduce the error:

    from flashgeotext.geotext import GeoText
    geotext2 = GeoText()
    
    input_text = '''Shanghai. The Chinese Ministry of Finance in Shanghai said that China plans
                        to cut tariffs on $75 billion worth of goods that the country
                        imports from the US. Washington welcomes the decision.'''
    
    geotext2.extract(input_text=input_text, span_info=False)
    

    Output: > "found_as": [input_text[span_start:span_end]], TypeError: slice indices must be integers or None or have an index method

    bug 
    opened by shreyjakhmolacactus 3
  • Initial impressions and questions of flashgeotext for extracting countries from affiliations

    Initial impressions and questions of flashgeotext for extracting countries from affiliations

    Thanks for posting at https://github.com/elyase/geotext/issues/23#issuecomment-593490351 letting me know about this package. I'm interested in it as a way to extract countries referred to in author affiliations.

    For example, here is an affiliation:

    'Multimodal Computing and Interaction', Saarland University & Department for Computational Biology and Applied Computing, Max Planck Institute for Informatics, Saarbrücken, 66123 Saarland, Germany, Ray and Stephanie Lane Center for Computational Biology, Carnegie Mellon University, Pittsburgh, 15206 PA, USA, Department of Mathematics and Computer Science, Freie Universität Berlin, 14195 Berlin, Germany, Université Pierre et Marie Curie, UMR7238, CNRS-UPMC, Paris, France and CNRS, UMR7238, Laboratory of Computational and Quantitative Biology, Paris, France.

    For my project, I'd like to know what countries are mentioned (either directly or inferred from a place mention inside that country).

    If I run the following (with v0.2.0):

    import flashgeotext.geotext
    geotexter = flashgeotext.geotext.GeoText(use_demo_data=True)
    affil = """\
    'Multimodal Computing and Interaction', Saarland University & Department for Computational Biology and Applied Computing, Max Planck Institute for Informatics, Saarbrücken, 66123 Saarland, Germany, \
    Ray and Stephanie Lane Center for Computational Biology, Carnegie Mellon University, Pittsburgh, 15206 PA, USA, \
    Department of Mathematics and Computer Science, Freie Universität Berlin, 14195 Berlin, Germany, Université Pierre et Marie Curie, UMR7238, CNRS-UPMC, Paris, France and CNRS, UMR7238, Laboratory of Computational and Quantitative Biology, Paris, France.
    """
    geo_text = geotexter.extract(affil, span_info=False)
    geo_text
    

    I get the following output:

    2020-03-02 18:50:46.475 | DEBUG    | flashgeotext.lookup:add:194 - cities added to pool
    2020-03-02 18:50:46.479 | DEBUG    | flashgeotext.lookup:add:194 - countries added to pool
    2020-03-02 18:50:46.480 | DEBUG    | flashgeotext.lookup:_add_demo_data:225 - demo data loaded for: ['cities', 'countries']
    {'cities': {'University': {'count': 2},
      'Saarbrücken': {'count': 1},
      'Carnegie': {'count': 1},
      'Pittsburgh': {'count': 1},
      'Berlin': {'count': 2},
      'Parys': {'count': 2}},
     'countries': {'Germany': {'count': 2},
      'United States': {'count': 1},
      'France': {'count': 2}}}
    

    Some impressions / questions?

    1. Are the city mentions counting towards country mentions? If yes, why does "United States" not have a count of 2 for "Pittsburgh" and "USA".

    2. Is "Parys" for "Paris"... not sure why this conversion is made.

    3. Counting "University" as a city will almost always be a false positive for us, although I'm guessing this is a source data issue.

    Thanks for considering this feedback / helping answer any of these questions.

    bug question 
    opened by dhimmel 3
  • chore(deps-dev): bump markdown-include from 0.7.0 to 0.8.0

    chore(deps-dev): bump markdown-include from 0.7.0 to 0.8.0

    Bumps markdown-include from 0.7.0 to 0.8.0.

    Release notes

    Sourced from markdown-include's releases.

    v0.8.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/cmacmackin/markdown-include/compare/v0.7.2...v0.8.0

    v0.7.2

    Project CI fix only

    Full Changelog: https://github.com/cmacmackin/markdown-include/compare/v0.7.1...v0.7.2

    v0.7.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/cmacmackin/markdown-include/compare/v0.7.0...v0.7.1

    Commits
    • fd3c00a Merge pull request #40 from cmacmackin/apply-black
    • 490d3cd CI: Automate black
    • 7bf110f Add git blame ignore file
    • b7b87a7 Apply black formatting
    • 993e858 Merge pull request #39 from cmacmackin/lines-and-line-ranges
    • f5e754d Add tests for including lines
    • 03c4ea0 Merge branch 'master' into lines-and-line-ranges
    • 692e499 Merge pull request #38 from cmacmackin/unittests-ci
    • 40109fb Delete outdated README.rst file
    • 6ae487c CI: Run tests
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • chore(deps-dev): bump awscli from 1.27.13 to 1.27.17

    chore(deps-dev): bump awscli from 1.27.13 to 1.27.17

    Bumps awscli from 1.27.13 to 1.27.17.

    Changelog

    Sourced from awscli's changelog.

    1.27.17

    • api-change:backup: AWS Backup introduces support for legal hold and application stack backups. AWS Backup Audit Manager introduces support for cross-Region, cross-account reports.
    • api-change:cloudwatch: Update cloudwatch command to latest version
    • api-change:drs: Non breaking changes to existing APIs, and additional APIs added to support in-AWS failing back using AWS Elastic Disaster Recovery.
    • api-change:ecs: This release adds support for ECS Service Connect, a new capability that simplifies writing and operating resilient distributed applications. This release updates the TaskDefinition, Cluster, Service mutation APIs with Service connect constructs and also adds a new ListServicesByNamespace API.
    • api-change:efs: Update efs command to latest version
    • api-change:iot-data: This release adds support for MQTT5 properties to AWS IoT HTTP Publish API.
    • api-change:iot: Job scheduling enables the scheduled rollout of a Job with start and end times and a customizable end behavior when end time is reached. This is available for continuous and snapshot jobs. Added support for MQTT5 properties to AWS IoT TopicRule Republish Action.
    • api-change:iotwireless: This release includes a new feature for customers to calculate the position of their devices by adding three new APIs: UpdateResourcePosition, GetResourcePosition, and GetPositionEstimate.
    • api-change:kendra: Amazon Kendra now supports preview of table information from HTML tables in the search results. The most relevant cells with their corresponding rows, columns are displayed as a preview in the search result. The most relevant table cell or cells are also highlighted in table preview.
    • api-change:logs: Updates to support CloudWatch Logs data protection and CloudWatch cross-account observability
    • api-change:mgn: This release adds support for Application and Wave management. We also now support custom post-launch actions.
    • api-change:oam: Amazon CloudWatch Observability Access Manager is a new service that allows configuration of the CloudWatch cross-account observability feature.
    • api-change:organizations: This release introduces delegated administrator for AWS Organizations, a new feature to help you delegate the management of your Organizations policies, enabling you to govern your AWS organization in a decentralized way. You can now allow member accounts to manage Organizations policies.
    • api-change:rds: This release enables new Aurora and RDS feature called Blue/Green Deployments that makes updates to databases safer, simpler and faster.
    • api-change:textract: This release adds support for classifying and splitting lending documents by type, and extracting information by using the Analyze Lending APIs. This release also includes support for summarized information of the processed lending document package, in addition to per document results.
    • api-change:transcribe: This release adds support for 'inputType' for post-call and real-time (streaming) Call Analytics within Amazon Transcribe.

    1.27.16

    • api-change:grafana: This release includes support for configuring a Grafana workspace to connect to a datasource within a VPC as well as new APIs for configuring Grafana settings.
    • api-change:rbin: This release adds support for Rule Lock for Recycle Bin, which allows you to lock retention rules so that they can no longer be modified or deleted.

    1.27.15

    • api-change:appflow: Adding support for Amazon AppFlow to transfer the data to Amazon Redshift databases through Amazon Redshift Data API service. This feature will support the Redshift destination connector on both public and private accessible Amazon Redshift Clusters and Amazon Redshift Serverless.
    • api-change:kinesisanalyticsv2: Support for Apache Flink 1.15 in Kinesis Data Analytics.

    1.27.14

    • api-change:route53: Amazon Route 53 now supports the Asia Pacific (Hyderabad) Region (ap-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.
    Commits
    • 4c3c2f3 Merge branch 'release-1.27.17'
    • 068265f Bumping version to 1.27.17
    • bb73db9 Update changelog based on model updates
    • 99f1f30 Merge branch 'release-1.27.16'
    • 11eab4e Merge branch 'release-1.27.16' into develop
    • e6b2e68 Bumping version to 1.27.16
    • 0d18491 Update changelog based on model updates
    • 1b0005a Merge branch 'release-1.27.15' into develop
    • 140ef2e Merge branch 'release-1.27.15'
    • f963121 Bumping version to 1.27.15
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • chore(deps-dev): bump poethepoet from 0.16.4 to 0.16.5

    chore(deps-dev): bump poethepoet from 0.16.4 to 0.16.5

    Bumps poethepoet from 0.16.4 to 0.16.5.

    Release notes

    Sourced from poethepoet's releases.

    v0.16.5

    Fixes

    New Contributors

    Full Changelog: https://github.com/nat-n/poethepoet/compare/v0.16.4...v0.16.5

    Commits
    • d266433 Bump version to 0.16.5
    • 15edd33 Fix issues on windows and restore changes from 0.16.1 (#106)
    • e41072c Fix typo in --help output (#105)
    • 1a6973a Add isort (#102)
    • f730b26 Add python 3.11 to the CI and update 'dev-dependencies' to 'group.dev.depende...
    • 53083b5 Only use tomli in python<3.11 (#100)
    • 6924b81 docs: use poetry add --group dev instead of poetry add --dev (#98)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • chore(deps): bump codecov/codecov-action from 3.1.0 to 3.1.1

    chore(deps): bump codecov/codecov-action from 3.1.0 to 3.1.1

    Bumps codecov/codecov-action from 3.1.0 to 3.1.1.

    Release notes

    Sourced from codecov/codecov-action's releases.

    3.1.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/codecov/codecov-action/compare/v3.1.0...v3.1.1

    Changelog

    Sourced from codecov/codecov-action's changelog.

    3.1.1

    Fixes

    • #661 Update deprecation warning
    • #593 Create codeql-analysis.yml
    • #712 README: fix typo
    • #725 fix: Remove a blank row
    • #726 Update README.md with correct badge version
    • #633 Create scorecards-analysis.yml
    • #747 fix: add more verbosity to validation
    • #750 Regenerate scorecards-analysis.yml
    • #774 Switch to v3
    • #783 Fix network entry in table
    • #791 Trim arguments after splitting them
    • #769 Plumb failCi into verification function.

    Dependencies

    • #713 build(deps-dev): bump typescript from 4.6.3 to 4.6.4
    • #714 build(deps): bump node-fetch from 3.2.3 to 3.2.4
    • #724 build(deps): bump github/codeql-action from 1 to 2
    • #717 build(deps-dev): bump @​types/jest from 27.4.1 to 27.5.0
    • #729 build(deps-dev): bump @​types/node from 17.0.25 to 17.0.33
    • #734 build(deps-dev): downgrade @​types/node to 16.11.35
    • #723 build(deps): bump actions/checkout from 2 to 3
    • #733 build(deps): bump @​actions/github from 5.0.1 to 5.0.3
    • #732 build(deps): bump @​actions/core from 1.6.0 to 1.8.2
    • #737 build(deps-dev): bump @​types/node from 16.11.35 to 16.11.36
    • #749 build(deps): bump ossf/scorecard-action from 1.0.1 to 1.1.0
    • #755 build(deps-dev): bump typescript from 4.6.4 to 4.7.3
    • #759 build(deps-dev): bump @​types/node from 16.11.36 to 16.11.39
    • #762 build(deps-dev): bump @​types/node from 16.11.39 to 16.11.40
    • #746 build(deps-dev): bump @​vercel/ncc from 0.33.4 to 0.34.0
    • #757 build(deps): bump ossf/scorecard-action from 1.1.0 to 1.1.1
    • #760 build(deps): bump openpgp from 5.2.1 to 5.3.0
    • #748 build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.0
    • #766 build(deps-dev): bump typescript from 4.7.3 to 4.7.4
    • #799 build(deps): bump openpgp from 5.3.0 to 5.4.0
    • #798 build(deps): bump @​actions/core from 1.8.2 to 1.9.1
    Commits
    • d9f34f8 release: update changelog and version to 3.1.1 (#828)
    • 0e9e7b4 Plumb failCi into verification function. (#769)
    • 7f20bd4 build(deps): bump @​actions/core from 1.8.2 to 1.9.1 (#798)
    • 13bc253 build(deps): bump openpgp from 5.3.0 to 5.4.0 (#799)
    • 5c0da1b Trim arguments after splitting them (#791)
    • 68d5f6d Fix network entry in table (#783)
    • 2a829b9 Switch to v3 (#774)
    • 8e09eaf build(deps-dev): bump typescript from 4.7.3 to 4.7.4 (#766)
    • 39e2229 build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.0 (#748)
    • b2b7703 build(deps): bump openpgp from 5.2.1 to 5.3.0 (#760)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • chore(deps): bump actions/cache from 3.2.2 to 3.2.3

    chore(deps): bump actions/cache from 3.2.2 to 3.2.3

    Bumps actions/cache from 3.2.2 to 3.2.3.

    Release notes

    Sourced from actions/cache's releases.

    v3.2.3

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3...v3.2.3

    Changelog

    Sourced from actions/cache's changelog.

    3.2.2

    • Reverted the changes made in 3.2.1 to use gnu tar and zstd by default on windows.

    3.2.3

    • Support cross os caching on Windows as an opt-in feature.
    • Fix issue with symlink restoration on Windows for cross-os caches.
    Commits
    • 58c146c Release support for cross-os caching as opt-in feature (#1060)
    • 6fd2d45 Add support to opt-in enable cross-os caching on windows (#1056)
    • 1f41429 Fixed broken link (#1057)
    • 365406c Merge pull request #1051 from uhooi/feature/add_mint_example
    • d621756 Update Mint example
    • 84e5400 Merge remote-tracking branch 'origin/main' into feature/add_mint_example
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
Releases(v0.4.2)
  • v0.4.2(Feb 1, 2022)

  • v0.4.1(Jan 31, 2022)

  • v0.4.0(Sep 13, 2021)

    Summary

    • removed the option to show the span_info and made it a default instead.
    • Additionally .extract now returns under what word (or synonym) the keyword was found in the input text.
    • As the configuration was implemented a little doofy, I updated how the configuration can be passed on init of GeoText.

    Refactor

    Fix

    • Make configuration better (e57150f)
    from flashgeotext.geotext import GeoText, GeoTextConfiguration
    
    config = GeoTextConfiguration(**{"use_demo_data":True})
    geotext = GeoText()
    
    input_text = '''Shanghai. The Chinese Ministry of Finance in Shanghai said that China plans
                    to cut tariffs on $75 billion worth of goods that the country
                    imports from the US. Washington welcomes the decision.'''
    
    geotext.extract(input_text=input_text)
    >> {
        'cities': {
            'Shanghai': {
                'count': 2,
                'span_info': [(0, 8), (45, 53)],
                'found_as': ['Shanghai', 'Shanghai'],
                },
            'Washington, D.C.': {
                'count': 1,
                'span_info': [(175, 185)],
                'found_as': ['Washington'],
                }
            },
        'countries': {
            'China': {
                'count': 1,
                'span_info': [(64, 69)],
                'found_as': ['China'],
                },
            'United States': {
                'count': 1,
                'span_info': [(171, 173)],
                'found_as': ['US'],
                }
            }
        }
    
    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Apr 13, 2021)

    • Switching package management to Poetry I accidentally introduced Python 3.8 as minimum requirement. Reverting to Python 3.7 as minimum requirement.
    • Some housekeeping
    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Apr 7, 2021)

    Loglevel is now set to WARNING by default and can be changed using environment variables.

    For example:

    export LOGURU_LEVEL=DEBUG to enable debug logging.

    Allowed levels are ERROR, WARNING, DEBUG and INFO

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Feb 28, 2021)

    Following up on #20 You can now choose to allow to ignore the case of the lookup data.

    from flashgeotext.geotext import GeoText
    geotext = GeoText(config = { "use_demo_data": True, "case_sensitive": True })
    text = "berlin ist ne tolle stadt"
    geotext.extract(input_text=text, span_info=True)
    >> { "cities": { "Berlin": [(0,6)] } 
    
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Mar 2, 2020)

    [0.2.0] - 2020-03-02

    • added script argument to LookupData to specify from what script the characters in the lookup will be, see usage, this will make sure that flashgeotext works properly with different character sets (latin, cyrillic, thai etc)
    • demo-data will (for now) use default character set as non_word_boundary, see @issue-13
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Feb 25, 2020)

    Initial release of flashgeotext

    Extract and count countries and cities from text, like GeoText on steroids using FlashText, an Aho-Corasick implementation. Flashgeotext is a fast, batteries-included (and BYOD) and native python library that extracts one or more sets of given city and country names (+ synonyms) from an input text.

    see docs

    Source code(tar.gz)
    Source code(zip)
Owner
Ben
geographer turned spatial engineer turned data-something turned software developer
Ben
TextFlint is a multilingual robustness evaluation platform for natural language processing tasks,

TextFlint is a multilingual robustness evaluation platform for natural language processing tasks, which unifies general text transformation, task-specific transformation, adversarial attack, sub-popu

TextFlint 587 Dec 20, 2022
PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.

VAENAR-TTS - PyTorch Implementation PyTorch Implementation of VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis.

Keon Lee 67 Nov 14, 2022
Simple multilingual lemmatizer for Python, especially useful for speed and efficiency

Simplemma: a simple multilingual lemmatizer for Python Purpose Lemmatization is the process of grouping together the inflected forms of a word so they

Adrien Barbaresi 70 Dec 29, 2022
An implementation of model parallel GPT-3-like models on GPUs, based on the DeepSpeed library. Designed to be able to train models in the hundreds of billions of parameters or larger.

GPT-NeoX An implementation of model parallel GPT-3-like models on GPUs, based on the DeepSpeed library. Designed to be able to train models in the hun

EleutherAI 3.1k Jan 08, 2023
UniSpeech - Large Scale Self-Supervised Learning for Speech

UniSpeech The family of UniSpeech: WavLM (arXiv): WavLM: Large-Scale Self-Supervised Pre-training for Full Stack Speech Processing UniSpeech (ICML 202

Microsoft 281 Dec 15, 2022
PhoNLP: A BERT-based multi-task learning toolkit for part-of-speech tagging, named entity recognition and dependency parsing

PhoNLP is a multi-task learning model for joint part-of-speech (POS) tagging, named entity recognition (NER) and dependency parsing. Experiments on Vietnamese benchmark datasets show that PhoNLP prod

VinAI Research 109 Dec 02, 2022
SpeechBrain is an open-source and all-in-one speech toolkit based on PyTorch.

The goal is to create a single, flexible, and user-friendly toolkit that can be used to easily develop state-of-the-art speech technologies, including systems for speech recognition, speaker recognit

SpeechBrain 5.1k Jan 09, 2023
Code Implementation of "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".

Span-ASTE: Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction ***** New March 31th, 2022: Scikit-Style API for Easy Usage *****

Chia Yew Ken 111 Dec 23, 2022
뉴스 도메인 질의응답 시스템 (21-1학기 졸업 프로젝트)

뉴스 도메인 질의응답 시스템 본 프로젝트는 뉴스기사에 대한 질의응답 서비스 를 제공하기 위해서 진행한 프로젝트입니다. 약 3개월간 ( 21. 03 ~ 21. 05 ) 진행하였으며 Transformer 아키텍쳐 기반의 Encoder를 사용하여 한국어 질의응답 데이터셋으로

TaegyeongEo 4 Jul 08, 2022
The aim of this task is to predict someone's English proficiency based on a text input.

English_proficiency_prediction_NLP The aim of this task is to predict someone's English proficiency based on a text input. Using the The NICT JLE Corp

1 Dec 13, 2021
customer care chatbot made with Rasa Open Source.

Customer Care Bot Customer care bot for ecomm company which can solve faq and chitchat with users, can contact directly to team. 🛠 Features Basic E-c

Dishant Gandhi 23 Oct 27, 2022
KoBERTopic은 BERTopic을 한국어 데이터에 적용할 수 있도록 토크나이저와 BERT를 수정한 코드입니다.

KoBERTopic 모델 소개 KoBERTopic은 BERTopic을 한국어 데이터에 적용할 수 있도록 토크나이저와 BERT를 수정했습니다. 기존 BERTopic : https://github.com/MaartenGr/BERTopic/tree/05a6790b21009d

Won Joon Yoo 26 Jan 03, 2023
🚀 RocketQA, dense retrieval for information retrieval and question answering, including both Chinese and English state-of-the-art models.

In recent years, the dense retrievers based on pre-trained language models have achieved remarkable progress. To facilitate more developers using cutt

475 Jan 04, 2023
a chinese segment base on crf

Genius Genius是一个开源的python中文分词组件,采用 CRF(Conditional Random Field)条件随机场算法。 Feature 支持python2.x、python3.x以及pypy2.x。 支持简单的pinyin分词 支持用户自定义break 支持用户自定义合并词

duanhongyi 237 Nov 04, 2022
A minimal Conformer ASR implementation adapted from ESPnet.

Conformer ASR A minimal Conformer ASR implementation adapted from ESPnet. Introduction I want to use the pre-trained English ASR model provided by ESP

Niu Zhe 3 Jan 24, 2022
Official source for spanish Language Models and resources made @ BSC-TEMU within the "Plan de las Tecnologías del Lenguaje" (Plan-TL).

Spanish Language Models 💃🏻 Corpora 📃 Corpora Number of documents Size (GB) BNE 201,080,084 570GB Models 🤖 RoBERTa-base BNE: https://huggingface.co

PlanTL-SANIDAD 203 Dec 20, 2022
💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants

Rasa Open Source Rasa is an open source machine learning framework to automate text-and voice-based conversations. With Rasa, you can build contextual

Rasa 15.3k Dec 30, 2022
Code for lyric-section-to-comment generation based on huggingface transformers.

CommentGeneration Code for lyric-section-to-comment generation based on huggingface transformers. Migrate Guyu model and code (both 12-layers and 24-l

Yawei Sun 8 Sep 04, 2021
A collection of Classical Chinese natural language processing models, including Classical Chinese related models and resources on the Internet.

GuwenModels: 古文自然语言处理模型合集, 收录互联网上的古文相关模型及资源. A collection of Classical Chinese natural language processing models, including Classical Chinese related models and resources on the Internet.

Ethan 66 Dec 26, 2022
189 Jan 02, 2023