Yet another Apertium stream parser
Project description
YASP
Yet another Apertium stream parser
Usage
>>> from pprint import pprint
>>> import yasp
>>> pprint(yasp.stream.parse('^prpers<prn><subj><p1><mf><sg>$ ^saw<vblex><pres>$ ^a<det><ind><sg>$ ^cat<n><sg>$'))
[('LEXICAL-UNIT',
[(('FLAG', ''),
('LING-FORM', 'prpers'),
('INVARIABLE-PART', []),
('TAGS', ['prn', 'subj', 'p1', 'mf', 'sg']),
('INVARIABLE-PART', []))]),
('UNPARSED', ' '),
('LEXICAL-UNIT',
[(('FLAG', ''),
('LING-FORM', 'saw'),
('INVARIABLE-PART', []),
('TAGS', ['vblex', 'pres']),
('INVARIABLE-PART', []))]),
('UNPARSED', ' '),
('LEXICAL-UNIT',
[(('FLAG', ''),
('LING-FORM', 'a'),
('INVARIABLE-PART', []),
('TAGS', ['det', 'ind', 'sg']),
('INVARIABLE-PART', []))]),
('UNPARSED', ' '),
('LEXICAL-UNIT',
[(('FLAG', ''),
('LING-FORM', 'cat'),
('INVARIABLE-PART', []),
('TAGS', ['n', 'sg']),
('INVARIABLE-PART', []))])]
>>>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yasp-0.0.1.tar.gz
(14.9 kB
view hashes)
Built Distribution
yasp-0.0.1-py3-none-any.whl
(14.9 kB
view hashes)