{"id":13809535,"url":"https://github.com/NeonGeckoCom/neon_utterance_zeroshot_ner_plugin","last_synced_at":"2025-05-14T08:32:33.673Z","repository":{"id":43872613,"uuid":"431073878","full_name":"NeonGeckoCom/neon_utterance_zeroshot_ner_plugin","owner":"NeonGeckoCom","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-15T02:12:38.000Z","size":5,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-02-15T15:32:53.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NeonGeckoCom.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-23T11:27:31.000Z","updated_at":"2021-11-25T20:51:15.000Z","dependencies_parsed_at":"2022-09-25T14:11:00.153Z","dependency_job_id":null,"html_url":"https://github.com/NeonGeckoCom/neon_utterance_zeroshot_ner_plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeonGeckoCom","download_url":"https://codeload.github.com/NeonGeckoCom/neon_utterance_zeroshot_ner_plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225282466,"owners_count":17449522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T02:00:29.586Z","updated_at":"2024-11-19T02:30:53.516Z","avatar_url":"https://github.com/NeonGeckoCom.png","language":"Python","funding_links":[],"categories":["OPM plugins"],"sub_categories":["Utterance Transformers"],"readme":"```python\ntars = TarsZeroShotNER()\n\n# this usually comes from mycroft.conf and is set by transformers service\n# labels can be anything, no training needed (zero shot learning)\n# the labels in this example are the default values if not set\ntars.config = { \"labels\": [\"Organization\", \"Vehicle\", \"Location\", \"City\", \"Country\", \"Person\"]}\n\nutts = [\"The Humboldt University of Berlin is situated near the Spree in Berlin, Germany\",\n        \"The president of Portugal is Marcelo Rebelo de Sousa\"]\n\n_, context = tars.transform(utts)\n\nprint(context)\n# {'zeroshot_ner': {'City': [{'entity': 'City',\n#                             'source_text': 'The Humboldt University of Berlin '\n#                                            'is situated near the Spree in '\n#                                            'Berlin, Germany',\n#                             'span': (64, 70),\n#                             'value': 'Berlin'}],\n#                   'Country': [{'entity': 'Country',\n#                                'source_text': 'The Humboldt University of '\n#                                               'Berlin is situated near the '\n#                                               'Spree in Berlin, Germany',\n#                                'span': (72, 79),\n#                                'value': 'Germany'}],\n#                   'Location': [{'entity': 'Location',\n#                                 'source_text': 'The Humboldt University of '\n#                                                'Berlin is situated near the '\n#                                                'Spree in Berlin, Germany',\n#                                 'span': (55, 60),\n#                                 'value': 'Spree'},\n#                                {'entity': 'Location',\n#                                 'source_text': 'The president of Portugal is '\n#                                                'Marcelo Rebelo de Sousa',\n#                                 'span': (17, 25),\n#                                 'value': 'Portugal'}],\n#                   'Organization': [{'entity': 'Organization',\n#                                     'source_text': 'The Humboldt University of '\n#                                                    'Berlin is situated near '\n#                                                    'the Spree in Berlin, '\n#                                                    'Germany',\n#                                     'span': (4, 33),\n#                                     'value': 'Humboldt University of Berlin'}],\n#                   'Person': [{'entity': 'Person',\n#                               'source_text': 'The president of Portugal is '\n#                                              'Marcelo Rebelo de Sousa',\n#                               'span': (29, 52),\n#                               'value': 'Marcelo Rebelo de Sousa'}]}}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNeonGeckoCom%2Fneon_utterance_zeroshot_ner_plugin/lists"}