{"id":26933209,"url":"https://github.com/xiaohan2012/capitalization-restoration","last_synced_at":"2025-04-02T09:18:01.274Z","repository":{"id":32773197,"uuid":"36364820","full_name":"xiaohan2012/capitalization-restoration","owner":"xiaohan2012","description":"Restore the capitalization of text ","archived":false,"fork":false,"pushed_at":"2015-08-27T12:54:46.000Z","size":173476,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"puls","last_synced_at":"2024-04-14T18:06:57.537Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiaohan2012.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":"2015-05-27T12:17:36.000Z","updated_at":"2024-04-14T18:06:57.537Z","dependencies_parsed_at":"2022-09-12T06:41:38.060Z","dependency_job_id":null,"html_url":"https://github.com/xiaohan2012/capitalization-restoration","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/xiaohan2012%2Fcapitalization-restoration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fcapitalization-restoration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fcapitalization-restoration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaohan2012%2Fcapitalization-restoration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaohan2012","download_url":"https://codeload.github.com/xiaohan2012/capitalization-restoration/tar.gz/refs/heads/puls","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246785478,"owners_count":20833498,"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":"2025-04-02T09:18:00.729Z","updated_at":"2025-04-02T09:18:01.264Z","avatar_url":"https://github.com/xiaohan2012.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nRestore the capitalize of news titles. For example, the original one(incorrectly capitalized) is *DreamWorks Animation zone to open in motiongate Dubai*.\n\nThe correctly capitalized one is *DreamWorks Animation zone to open in motiongate Dubai*.\n\nWe want to restore to the above.\n\n# Usage\n\n## Python call\n\n\t\u003e\u003e\u003e from cap_restore import DefaultRestorer\n\t\u003e\u003e\u003e restorer=DefaultRestorer()\n\t\u003e\u003e\u003e s = u\"Kingdom's Tourism and Hospitality Sector to Draw Huge Investments\".split()\n\t\u003e\u003e\u003e docpath = \"/group/home/puls/Shared/capitalization-recovery/10/www.zawya.com.rssfeeds.tourism/E85D3090167053EFB118C243D9747FAC\"\n\t\u003e\u003e\u003e print \" \".join(restorer.restore(s, docpath=docpath))\n\tKingdom's Tourism and hospitality sector to draw huge investments\n\t\u003e\u003e\u003e pos = ('NNP', ':', VBP, 'CC', 'NNP', 'NNP', 'TO', 'NNP', 'NNP', 'NNP')\n\t\u003e\u003e\u003e print \" \".join(restorer.restore(s, docpath=docpath, pos=pos))\n\tKingdom's tourism and hospitality sector to draw huge investments\n\n### POS tag\n\nPOS tags can be passed in the request so that `NLTK.pos_tag` is not called. For the tag format, please use [Penn Part of Speech Tags]( http://cs.nyu.edu/grishman/jet/guide/PennPOS.html).\n\n## Command line\n\nFirst, open the web service:\n\n    \u003e\u003e\u003e python service.py\n\nSecond, \n\n    \u003e\u003e\u003e python capitalization_restoration_web.py --help\n\n\n## Demo\n\nFor Curl:\n\n    \u003e\u003e\u003e ./curl_cmd_demo.sh\n\nFor Shell:\n\n    \u003e\u003e\u003e ./py_cmd_demo.sh\n\n\n## How to add new features\n\n1. Modify the `feature_extractor.py` and `feature_template.py`\n2. Retrain the data\n3. Update the model in `models/`\n\n## Links\n\n- [Monit(service supervision tool)](https://mmonit.com/monit/)\n\n\n## Running Monit\n\nBefore running `monit`, paths setting should be fixed.\n\nTwo things should be done:\n\n1. Ensure the `pid` directory in `cap_restore.sh` is writable\n2. Ensure the \"check process\" part in `monitrc` has the correct path information\n\n\nThen, run the following to start monitoring\n\n    \u003e\u003e\u003e monit -c /path/to/monitrc # one sample is shiped under this directory\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaohan2012%2Fcapitalization-restoration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaohan2012%2Fcapitalization-restoration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaohan2012%2Fcapitalization-restoration/lists"}