{ "info": { "author": "Mehmet Dolgun", "author_email": "m.dolgun@yahoo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6" ], "description": "GLRParser\n=========\n\nA GLR Parser for Natural Language Processing and Translation\n\nGLRParser is not just a parser. It's\n\n* Natural Language Parser which handles ambiguous grammars\n* Unification Engine which handles unification of features\n* Translation Engine for Syntax-Based Translation of Natural Languages\n\nFor detailed information, you can refer to wiki page: https://github.com/mdolgun/GLRParser/wiki\n\n\nSample code for parsing and translation should be like:\n\n.. code:: python\n\n\tfrom GLRParser import Parser, ParseError, GrammarError, Tree\n\n\ttry:\n\t\tparser = Parser() # initialize parser object\n\n\t\tparser.load_grammar(\"GLRParser\\grm\\simple_trans.grm\") # load grammar from a file\n\t\tsent = \"i saw the man in the house with the telescope\" # sentence to parse\n\n\t\tparser.compile() # constructs parsing tables\n\t\tparser.parse(sent) # parse the sentence\n\n\t\ttree = parser.make_tree() # generates parse forest\n\t\tttree = parser.trans_tree(tree) # translate the parse forest\n\n\t\tprint(ttree.pformatr()) # pretty-print the translated parse forest\n\n\t\tfor trans in ttree.enum(): # enumerate and print all alternative translations in the parse forest\n\t\t\tprint(trans.replace(\" -\",\"\")) # concat suffixes\n\texcept GrammarError as ge:\n\t\tprint(ge)\n\texcept ParseError as pe:\n\t\tprint(pe))\n\nSimple grammar for English -> Turkish translation (see simple_trans.grm)\n\n::\n\n S -> NP VP : NP VP\n S -> S in NP : NP -de S \n S -> S with NP : NP -la S \n NP -> i : \n NP -> the man : adam\n NP -> the telescope : teleskop\n NP -> the house : ev\n NP -> NP-1 in NP-2 : NP-2 -deki NP-1\n NP -> NP-1 with NP-2 : NP-2 -lu NP-1\n VP -> saw NP : NP -\u0131 g\u00f6rd\u00fcm \n\nGiven the above grammar and input string:\n\n::\n\n i saw the man in the house with the telescope\n\nIt produces a parse forest, and 5 alternative translations (of\nwhich two are identical):\n\n::\n\n 1. teleskopla evde adam\u0131 g\u00f6rd\u00fcm\n 2. teleskopla evdeki adam\u0131 g\u00f6rd\u00fcm\n 3. teleskoplu evde adam\u0131 g\u00f6rd\u00fcm\n 4. teleskoplu evdeki adam\u0131 g\u00f6rd\u00fcm\n 5. teleskoplu evdeki adam\u0131 g\u00f6rd\u00fcm\n\nThe semantic interpretations are:\n\n::\n\n 1. saw(in the house) saw(with the telescope)\n 2. man(in the house) saw(with the telescope) \n 3. saw(in the house) house(with the telescope)\n 4. man(in the house) man(with the telescope)\n 5. man(in the house) house(with the telescope)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mdolgun/GLRParser", "keywords": "NLP MachineTranslation Parser GLR Turkish", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "GLRParser", "package_url": "https://pypi.org/project/GLRParser/", "platform": "", "project_url": "https://pypi.org/project/GLRParser/", "project_urls": { "Homepage": "https://github.com/mdolgun/GLRParser" }, "release_url": "https://pypi.org/project/GLRParser/0.2.7/", "requires_dist": null, "requires_python": "", "summary": "A GLR Parser for Natural Language Processing and Translation", "version": "0.2.7" }, "last_serial": 3722493, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "ec6e0d2e2edbbd7713c7aaeb35f74e3a", "sha256": "7da382db0857235b6411d80fc828db2381c0d777556a156e882c010c158178e4" }, "downloads": -1, "filename": "GLRParser-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ec6e0d2e2edbbd7713c7aaeb35f74e3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14227, "upload_time": "2018-03-05T21:14:15", "url": "https://files.pythonhosted.org/packages/39/b1/442e6aedc56a1a6038b1f78ee96d235cc4a8616a4771dbc7f4edfa1c6e04/GLRParser-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f5a5475f149ff9099f91e29d78828b81", "sha256": "e88782f5bd394c7da72c2652f81e271a7126f51ea486eff0eff337ff3fef444a" }, "downloads": -1, "filename": "GLRParser-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f5a5475f149ff9099f91e29d78828b81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14495, "upload_time": "2018-03-08T09:45:11", "url": "https://files.pythonhosted.org/packages/62/c6/8868182336fdfa8a0ad3e7413e43d26b12611bf3e5d89a27f273770789e8/GLRParser-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "c2e98268c714a018443b7dc9c9d56a44", "sha256": "81352e2669aa04f22322a6c20292be034fbdefb9f8e119dc96b4b2ea2211edd0" }, "downloads": -1, "filename": "GLRParser-0.2.3.tar.gz", "has_sig": false, "md5_digest": "c2e98268c714a018443b7dc9c9d56a44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14560, "upload_time": "2018-03-09T15:49:26", "url": "https://files.pythonhosted.org/packages/08/91/c50e9e7fa25bd2382f7d30fb1d3afc17aa53fc98e9d2e7bc34e6a91b2ac0/GLRParser-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "06d281c5a4e7c4d03191568f3f8fdb9e", "sha256": "b659e68055146d177fa93c31e4e5964f5c80d497cfc6efef55d524add22b730f" }, "downloads": -1, "filename": "GLRParser-0.2.4.tar.gz", "has_sig": false, "md5_digest": "06d281c5a4e7c4d03191568f3f8fdb9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 99372, "upload_time": "2018-03-09T17:15:59", "url": "https://files.pythonhosted.org/packages/42/db/67b8ec79d372fe634eb7b5f08f84ca654fcbf9dab240814c026a783d1f57/GLRParser-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "b2862bc3cec8c5f8bb3d3b7a72f0e3b3", "sha256": "78d4b2669175bcaa33bc1ac053c69e86cff7e7b7f619554cbdc7d71e501f6523" }, "downloads": -1, "filename": "GLRParser-0.2.5.tar.gz", "has_sig": false, "md5_digest": "b2862bc3cec8c5f8bb3d3b7a72f0e3b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48363, "upload_time": "2018-03-16T17:30:39", "url": "https://files.pythonhosted.org/packages/0f/2b/8ad798f5fd480e412e114d3920515b3d44b3efca49a68ed95f3cf69366da/GLRParser-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "190d7ae8f158ebd4681eb9679e49e45a", "sha256": "dc9ef7c1171122616fdbb583d726fdf29956e29130b5149e3fdcc02aa34ad27f" }, "downloads": -1, "filename": "GLRParser-0.2.6.tar.gz", "has_sig": false, "md5_digest": "190d7ae8f158ebd4681eb9679e49e45a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47089, "upload_time": "2018-03-31T18:05:43", "url": "https://files.pythonhosted.org/packages/2e/ce/2c81d6ad7c106e00846ec949db437a219ae40204feec1c2865acdb7dee74/GLRParser-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "471cd29bb9e2779cb0797eee64a10cc8", "sha256": "71f2eb33b78ea006de7e7bb57756d3599fe87d6a5462896d5c8e30e0fdbd7269" }, "downloads": -1, "filename": "GLRParser-0.2.7.tar.gz", "has_sig": false, "md5_digest": "471cd29bb9e2779cb0797eee64a10cc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47223, "upload_time": "2018-03-31T18:38:21", "url": "https://files.pythonhosted.org/packages/60/6e/b19543c38bcd16ea218a3b520a7686884226d7985cad7ce56089d02c4757/GLRParser-0.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "471cd29bb9e2779cb0797eee64a10cc8", "sha256": "71f2eb33b78ea006de7e7bb57756d3599fe87d6a5462896d5c8e30e0fdbd7269" }, "downloads": -1, "filename": "GLRParser-0.2.7.tar.gz", "has_sig": false, "md5_digest": "471cd29bb9e2779cb0797eee64a10cc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47223, "upload_time": "2018-03-31T18:38:21", "url": "https://files.pythonhosted.org/packages/60/6e/b19543c38bcd16ea218a3b520a7686884226d7985cad7ce56089d02c4757/GLRParser-0.2.7.tar.gz" } ] }