apertium / apertium/streamparser

Fails on *+*

Open
#34 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hello!

Streamparser always fails while trying to parse this output of apertium's tagger:
'^*+*/*+*$'

Original string is '*+*'.

Traceback (most recent call last):
File "apertium2fastmorph.py", line 137, in parse_apertium
pos = mainpos(r)
File "streamparser/streamparser.py", line 90, in mainpos
return reading[-1].tags[0] # type: ignore
IndexError: list index out of range

I parsed the entire corpus consisting of hundreds of millions tokens, and this is the only part where it fails. If I change *+* to +* or *+ or ** or *** it works.

It seems that it is a bug.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.