{"id":19784050,"url":"https://github.com/openeventdata/petrarch","last_synced_at":"2025-04-30T22:32:00.478Z","repository":{"id":14585202,"uuid":"17301729","full_name":"openeventdata/petrarch","owner":"openeventdata","description":"The Python-language successor to the TABARI event-data coding software.","archived":false,"fork":false,"pushed_at":"2017-07-21T14:39:48.000Z","size":3160,"stargazers_count":45,"open_issues_count":7,"forks_count":24,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-06T05:34:29.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/openeventdata.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-02-28T22:23:05.000Z","updated_at":"2024-09-04T09:45:57.000Z","dependencies_parsed_at":"2022-09-11T07:01:49.373Z","dependency_job_id":null,"html_url":"https://github.com/openeventdata/petrarch","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeventdata%2Fpetrarch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeventdata%2Fpetrarch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeventdata%2Fpetrarch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeventdata%2Fpetrarch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openeventdata","download_url":"https://codeload.github.com/openeventdata/petrarch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251791723,"owners_count":21644447,"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-12T06:10:07.204Z","updated_at":"2025-04-30T22:32:00.027Z","avatar_url":"https://github.com/openeventdata.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/openeventdata/petrarch.svg?branch=master)](https://travis-ci.org/openeventdata/petrarch)\n\nPETRARCH\n========\n\n[![Join the chat at https://gitter.im/openeventdata/petrarch](https://badges.gitter.im/openeventdata/petrarch.svg)](https://gitter.im/openeventdata/petrarch?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nCode for the new Python Engine for Text Resolution And Related Coding Hierarchy (PETRARCH) \nevent data coder. The coder now has all of the functions from the older TABARI coder \nand the new CAMEO.verbpatterns.140609.txt dictionary incorporates both parser-based matching \nand extensive synonym sets. The program coded 60,000 AFP sentences from the GigaWord corpus \nwithout crashing, using the included dictionaries.\n\nFor more information, please visit the (work-in-progress)\n[documentation](http://petrarch.readthedocs.org/en/latest/#).\n\n**Note \u003cPAS 21-July-2017\u003e:** The most recent version here went through quite a few modifications -- for example eliminating most of the debugging and all of the unit-test/validation code -- prior to eventually being transitioned to the essentially entirely new program PETRARCH-2. Consequently if for some reason you wish to return to \"PETRARCH-Classic\", you might want to either go back to circa version 76ccdbffddbcb10bfa5bf4491bcdee2301f3e24e, or just get the stable version at https://github.com/philip-schrodt/petrarch, which does include a 284-record validation suite. Most of our development, however, has shifted to https://github.com/openeventdata/UniversalPetrarch, which uses a universal dependency parse rather than a constituency parse, and that code is likely a more useful base than the PETRARCH code.\n\n##Installing\n\nInstalling the program is as simple as:\n\n`pip install git+https://github.com/openeventdata/petrarch.git`\n\nThis will install the program with a command-line hook. You can now run the program using:\n\n``petrarch \u003cCOMMAND NAME\u003e [OPTIONS]``\n\nYou can get more information using:\n\n``petrarch -h``\n\n##Running\n\n###But first, a note.\n\nIt is possible to run PETRARCH as a stand-alone program. Most of our\ndevelopment work has gone into incorporating PETRARCH into a full pipeline of\nutilities, though, e.g., the [Phoenix pipeline](https://github.com/openeventdata/phoenix_pipeline).\nThere's also a RESTful wrapper around PETRARCH and CoreNLP named\n[hypnos](https://github.com/caerusassociates/hypnos). It's probably worthwhile\nto explore those options before trying to use PETRARCH as a stand-alone.\n\n###With that out of the way...\n\nCurrently, you can run PETRARCH using the following command if installed:\n\n``petrarch batch -i \u003cINPUT FILE\u003e ``\n\nIf not installed:\n\n``python petrarch.py batch -i data/text/GigaWord.sample.PETR.xml``\n\nThere's also the option to specify a configuration file using the ``-c \u003cCONFIG\nFILE\u003e`` flag, but the program will default to using ``PETR_config.ini``.\n\nWhen you run the program, a ``PETRARCH.log`` file will be opened in the current\nworking directory. This file will contain general information, e.g., which\nfiles are being opened, and error messages.\n\n##Unit tests\n\nCommits should always successfully complete\n\n``petrarch validate``\n\nThis command defaults to the ``PETR.UnitTest.records.txt`` file included with the\nprogram. Alternative files can be indicated using the ``-i`` option. For example\n(this is equivalent to the default command):\n\n``petrarch validate -i data/text/PETR.UnitTest.records.xml``\n\nThe final record should read\n\n    Sentence: FINAL-RECORD [ DEMO ]\n    ALL OF THE UNIT TESTS WERE CODED CORRECTLY. \n    No events should be coded\n    No events were coded\n    Events correctly coded in FINAL-RECORD\n    Exiting: \u003cStop\u003e record \n\nThere's also a check of the basic functionalities of PETRARCH available using\n`pytest`. If you have `pytest` installed simply run `py.test` in the top-level\ndirectory.\n\n##Compatibilities with TABARI dictionaries\n\nPETRARCH has a much richer dictionary syntax than TABARI, and because PETRARCH uses \nparsed input, many dictionary entries used by TABARI for noun-verb disambiguation are \nno longer needed. While the initial versions of the program could use existing TABARI \ndictionaries, PETRARCH-formatted dictionaries are now required: these are available in \nthis repository and in https://github.com/openeventdata/Dictionaries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeneventdata%2Fpetrarch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopeneventdata%2Fpetrarch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeneventdata%2Fpetrarch/lists"}