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': '',
'INVARIABLE-PART0': [],
'INVARIABLE-PART1': [],
'LING-FORM': 'prpers',
'TAGS': ['prn', 'subj', 'p1', 'mf', 'sg']}]),
('UNPARSED', ' '),
('LEXICAL-UNIT',
[{'FLAG': '',
'INVARIABLE-PART0': [],
'INVARIABLE-PART1': [],
'LING-FORM': 'saw',
'TAGS': ['vblex', 'pres']}]),
('UNPARSED', ' '),
('LEXICAL-UNIT',
[{'FLAG': '',
'INVARIABLE-PART0': [],
'INVARIABLE-PART1': [],
'LING-FORM': 'a',
'TAGS': ['det', 'ind', 'sg']}]),
('UNPARSED', ' '),
('LEXICAL-UNIT',
[{'FLAG': '',
'INVARIABLE-PART0': [],
'INVARIABLE-PART1': [],
'LING-FORM': 'cat',
'TAGS': ['n', 'sg']}])]
>>>
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.1.1.tar.gz
(15.2 kB
view hashes)
Built Distribution
yasp-0.1.1-py3-none-any.whl
(15.2 kB
view hashes)