Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ppke-nlpg/purepospy
Python wrapper for PurePos
https://github.com/ppke-nlpg/purepospy
Last synced: 3 months ago
JSON representation
Python wrapper for PurePos
- Host: GitHub
- URL: https://github.com/ppke-nlpg/purepospy
- Owner: ppke-nlpg
- License: lgpl-3.0
- Created: 2014-07-18T07:59:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-12-14T19:31:35.000Z (almost 5 years ago)
- Last Synced: 2024-05-18T17:58:18.879Z (6 months ago)
- Language: Java
- Size: 4.57 MB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hungarian-nlp - purepos.py
README
# __Warning: This repository might not contain the newest version of the source code. The development is continued at https://github.com/dlt-rilmta/purepospy__
---
# PurePosPy
A Python3 wrapper for [PurePos](https://github.com/ppke-nlpg/purepos).
## Requirements
- See requirements.txt.
- Model (already included) e.g. [Szeged corpus](http://rgai.inf.u-szeged.hu/index.php?lang=en&page=SzegedTreebank) with [emMorph tags](http://e-magyar.hu/en/textmodules/emmorph_codelist).## Usage
The authors recommend using PurePOSPy in [emtsv](https://github.com/dlt-rilmta/emtsv) the new version of [e-magyar](http://www.e-magyar.hu) language processing system. This module is called *emTag*.
The PurePOS class is a Python 3 wrapper class around PurePos, which can be used for training and tagging
```python
>>> from purepospy import PurePOS
>>> p = PurePOS('szeged.model') # New, or existing file
>>> tok = ['word', 'lemma', 'tag']
>>> sent = [tok, tok, ...]
>>> sentences = [[sent],[sent], ...]
>>> p.train(sentences) # Training, optional
>>> p.tag_sentence('Sentence as string , tokenised .')
Output#output_lemma#output_tag as#as_lemma#as_tag string#string_lemma#string_tag .#.#PUNCT
```## License
This Python wrapper, and utilities are licensed under the LGPL 3.0 license.
PurePos has its own license.