{"id":19140490,"url":"https://github.com/livingbio/syntaxnet_wrapper","last_synced_at":"2025-10-25T00:02:29.024Z","repository":{"id":89728012,"uuid":"67388163","full_name":"livingbio/syntaxnet_wrapper","owner":"livingbio","description":"A Python Wrapper for Google SyntaxNet","archived":false,"fork":false,"pushed_at":"2023-11-25T05:32:38.000Z","size":74,"stargazers_count":33,"open_issues_count":9,"forks_count":10,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-29T03:02:55.115Z","etag":null,"topics":["google-syntaxnet","nlp","python","python-wrapper","syntaxnet"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/livingbio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-05T04:32:18.000Z","updated_at":"2025-06-18T02:11:15.000Z","dependencies_parsed_at":"2023-11-25T06:34:47.241Z","dependency_job_id":null,"html_url":"https://github.com/livingbio/syntaxnet_wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/livingbio/syntaxnet_wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livingbio%2Fsyntaxnet_wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livingbio%2Fsyntaxnet_wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livingbio%2Fsyntaxnet_wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livingbio%2Fsyntaxnet_wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/livingbio","download_url":"https://codeload.github.com/livingbio/syntaxnet_wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livingbio%2Fsyntaxnet_wrapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268644507,"owners_count":24283338,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["google-syntaxnet","nlp","python","python-wrapper","syntaxnet"],"created_at":"2024-11-09T07:17:43.702Z","updated_at":"2025-10-25T00:02:29.014Z","avatar_url":"https://github.com/livingbio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Python Wrapper for Google SyntaxNet\n\n## Installation\n\n### Prerequisites\n\n#### Install OpenJDK8.\n\n```shell-script\nadd-apt-repository -y ppa:openjdk-r/ppa\napt-get -y update\napt-get -y install openjdk-8-jdk\n```\n\n#### Install `bazel` and include `bazel` in `$PATH`.\n\n**Note:** Only bazel 0.4.3 is runnable. bazel 0.4.4 may cause errors.\n\n```shell-script\nwget https://github.com/bazelbuild/bazel/releases/download/0.4.3/bazel-0.4.3-installer-linux-x86_64.sh\nchmod +x bazel-0.4.3-installer-linux-x86_64.sh\n./bazel-0.4.3-installer-linux-x86_64.sh --user\nrm bazel-0.4.3-installer-linux-x86_64.sh\nexport PATH=\"$PATH:$HOME/bin\"\n```\n\n#### Install system package dependencies.\n\n```shell-script\napt-get -y install swig unzip\n```\n\n#### Install Python packages\n\n**Note:** Current version of syntaxnet must be used with tensorflow r1.0.\n\n```shell-script\npip install tensorflow protobuf asciitree mock\n```\n\n\n#### Start Installing\n\n```shell-script\npip install git+ssh://git@github.com/livingbio/syntaxnet_wrapper.git#egg=syntaxnet_wrapper\n```\n\n#### If installation failed...\n\nExecute [test.sh](https://github.com/livingbio/syntaxnet_wrapper/blob/master/syntaxnet_wrapper/test.sh), you should see following outputs:\n\n```\n1       Bob     _       PROPN   NNP     Number=Sing|fPOS=PROPN++NNP     2       nsubj   _       _\n2       brought _       VERB    VBD     Mood=Ind|Tense=Past|VerbForm=Fin|fPOS=VERB++VBD 0       ROOT    _ _\n3       the     _       DET     DT      Definite=Def|PronType=Art|fPOS=DET++DT  4       det     _       _\n4       pizza   _       NOUN    NN      Number=Sing|fPOS=NOUN++NN       2       dobj    _       _\n5       to      _       ADP     IN      fPOS=ADP++IN    6       case    _       _\n6       Alice.  _       PROPN   NNP     Number=Sing|fPOS=PROPN++NNP     2       nmod    _       _\n\n1       球      _       PROPN   NNP     fPOS=PROPN++NNP 4       nsubj   _       _\n2       從      _       ADP     IN      fPOS=ADP++IN    3       case    _       _\n3       天上    _       NOUN    NN      fPOS=NOUN++NN   4       nmod    _       _\n4       掉      _       VERB    VV      fPOS=VERB++VV   0       ROOT    _       _\n5       下來    _       VERB    VV      fPOS=VERB++VV   4       mark    _       _\n\n球 從天 上 掉 下 來\n```\n\nIf the outputs are correct, problems are caused by the wrapper. If the outputs are wrong, compilation of syntaxnet may be failed.\n\n## Usage\n\n```python\nfrom syntaxnet_wrapper import tagger, parser\n\nprint tagger['en'].query('this is a good day', returnRaw=True)\n# 1       this    _       DET     DT      _       0       _       _       _\n# 2       is      _       VERB    VBZ     _       0       _       _       _\n# 3       a       _       DET     DT      _       0       _       _       _\n# 4       good    _       ADJ     JJ      _       0       _       _       _\n# 5       day     _       NOUN    NN      _       0       _       _       _\ntagger['en'].query('this is a good day')  # in default, return splitted text\n\nprint parser['en'].query('Alice drove down the street in her car', returnRaw=True)\n# 1       Alice   _       NOUN    NNP     _       2       nsubj   _       _\n# 2       drove   _       VERB    VBD     _       0       ROOT    _       _\n# 3       down    _       ADP     IN      _       2       prep    _       _\n# 4       the     _       DET     DT      _       5       det     _       _\n# 5       street  _       NOUN    NN      _       3       pobj    _       _\n# 6       in      _       ADP     IN      _       2       prep    _       _\n# 7       her     _       PRON    PRP$    _       8       poss    _       _\n# 8       car     _       NOUN    NN      _       6       pobj    _       _\n\n# use Chinese model\nprint tagger['zh'].query(u'今天 天氣 很 好', returnRaw=True)\n# 1       今天    _       NOUN    NN      fPOS=NOUN++NN   0       _       _       _\n# 2       天氣    _       NOUN    NN      fPOS=NOUN++NN   0       _       _       _\n# 3       很      _       ADV     RB      fPOS=ADV++RB    0       _       _       _\n# 4       好      _       ADJ     JJ      fPOS=ADJ++JJ    0       _       _       _\n\nprint parser['zh'].query(u'今天 天氣 很 好', returnRaw=True)\n# 1       今天    _       NOUN    NN      fPOS=NOUN++NN   4       nmod:tmod       _       _\n# 2       天氣    _       NOUN    NN      fPOS=NOUN++NN   4       nsubj   _       _\n# 3       很      _       ADV     RB      fPOS=ADV++RB    4       advmod  _       _\n# 4       好      _       ADJ     JJ      fPOS=ADJ++JJ    0       ROOT    _       _\n```\n\n### Language Selection\n\nThe default model is `'English-Parsey'`. This is\n[announced by Google](https://research.googleblog.com/2016/05/announcing-syntaxnet-worlds-most.html)\non May, 2016.\nOther models, includes `'English'`, are trained by [Universal Dependencies](http://universaldependencies.org/),\n[announced by Google](https://research.googleblog.com/2016/08/meet-parseys-cousins-syntax-for-40.html)\non August, 2016.\n\n```python\nfrom syntaxnet_wrapper import language_code_to_model_name\nlanguage_code_to_model_name\n# {'ar': 'Arabic',\n#  'bg': 'Bulgarian',\n#  'ca': 'Catalan',\n#  'cs': 'Czech',\n#  'da': 'Danish',\n#  'de': 'German',\n#  'el': 'Greek',\n#  'en': 'English-Parsey',\n#  'en-uni': 'English',\n#  'es': 'Spanish',\n#  'et': 'Estonian',\n#  'eu': 'Basque',\n#  'fa': 'Persian',\n#  'fi': 'Finnish',\n#  'fr': 'French',\n#  'ga': 'Irish',\n#  'gl': 'Galician',\n#  'hi': 'Hindi',\n#  'hr': 'Croatian',\n#  'hu': 'Hungarian',\n#  'id': 'Indonesian',\n#  'it': 'Italian',\n#  'iw': 'Hebrew',\n#  'kk': 'Kazakh',\n#  'la': 'Latin',\n#  'lv': 'Latvian',\n#  'nl': 'Dutch',\n#  'no': 'Norwegian',\n#  'pl': 'Polish',\n#  'pt': 'Portuguese',\n#  'ro': 'Romanian',\n#  'ru': 'Russian',\n#  'sl': 'Slovenian',\n#  'sv': 'Swedish',\n#  'ta': 'Tamil',\n#  'tr': 'Turkish',\n#  'zh': 'Chinese',\n#  'zh-cn': 'Chinese',\n#  'zh-tw': 'Chinese'}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivingbio%2Fsyntaxnet_wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flivingbio%2Fsyntaxnet_wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivingbio%2Fsyntaxnet_wrapper/lists"}