{"id":18507911,"url":"https://github.com/educationaltestingservice/node-zpar","last_synced_at":"2025-04-09T03:31:36.769Z","repository":{"id":20513658,"uuid":"23792366","full_name":"EducationalTestingService/node-zpar","owner":"EducationalTestingService","description":"A node package that allows using the ZPar English parser with node.js","archived":false,"fork":false,"pushed_at":"2015-07-28T14:05:05.000Z","size":2444,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-23T22:37:58.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/EducationalTestingService.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}},"created_at":"2014-09-08T13:47:13.000Z","updated_at":"2024-07-30T13:24:11.000Z","dependencies_parsed_at":"2022-08-05T08:16:24.579Z","dependency_job_id":null,"html_url":"https://github.com/EducationalTestingService/node-zpar","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/EducationalTestingService%2Fnode-zpar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EducationalTestingService%2Fnode-zpar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EducationalTestingService%2Fnode-zpar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EducationalTestingService%2Fnode-zpar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EducationalTestingService","download_url":"https://codeload.github.com/EducationalTestingService/node-zpar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247973659,"owners_count":21026709,"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-11-06T15:12:49.163Z","updated_at":"2025-04-09T03:31:36.362Z","avatar_url":"https://github.com/EducationalTestingService.png","language":"JavaScript","readme":"### Introduction\r\n\r\n**node-zpar** is a node package that allows using the [ZPar tagger and parser](https://github.com/frcchang/zpar) with node.js. ZPar was written by [Yue Zhang](http://www.sutd.edu.sg/yuezhang.aspx) while he was at Oxford University. According to its home page: *ZPar is a statistical natural language parser, which performs syntactic analysis tasks including word segmentation, part-of-speech tagging and parsing. ZPar supports multiple languages and multiple grammar formalisms. ZPar has been most heavily developed for Chinese and English, while it provides generic support for other languages. ZPar is fast, processing above 50 sentences per second using the standard Penn Teebank (Wall Street Journal) data.*\r\n\r\nThis is a simple port of my other project [python-zpar](https://github.com/desilinguist/python-zpar.git) to node.js using the amazing [node-ffi](https://github.com/node-ffi/node-ffi) package. \r\n\r\nUsing the package is really easy:\r\n```javascript\r\n// Load the module\r\n\u003e zpar = require('./zpar')\r\n{ load_models: { [Function] async: [Function] },\r\n  load_tagger: { [Function] async: [Function] },\r\n  load_parser: { [Function] async: [Function] },\r\n  load_depparser: { [Function] async: [Function] },\r\n  tag_sentence: { [Function] async: [Function] },\r\n  parse_sentence: { [Function] async: [Function] },\r\n  dep_parse_sentence: { [Function] async: [Function] },\r\n  unload_models: { [Function] async: [Function] } }\r\n\r\n// Load the tagger model\r\n\u003e zpar.load_tagger('/Users/nmadnani/work/NLPTools/zpar/english')\r\nLoading tagger from /Users/nmadnani/work/NLPTools/zpar/english/tagger\r\nLoading model... done.\r\n0\r\n\r\n// Tag any sentence. Note the need for the newline and the space at the end.\r\n// ZPar's tokenizer requires that.\r\n\u003e zpar.tag_sentence('I am going to the market.\\n ')\r\n'I/PRP am/VBP going/VBG to/TO the/DT market/NN ./.'\r\n\r\n\u003e zpar.unload_models()\r\nnull\r\n```\r\n\r\nThe other functions work in a similar fashion. \r\n\r\nNote that the the package currently only works on 64-bit Linux and OS X systems. Right now, the zpar shared libraries for both these platforms are actually pre-compiled and bundled with the package. I am new to node and am still figuring out how to make this package installable via `npm`. Pull requests are obviously welcome!\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feducationaltestingservice%2Fnode-zpar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feducationaltestingservice%2Fnode-zpar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feducationaltestingservice%2Fnode-zpar/lists"}