Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolution issue #3001 #3018

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

JuanIMartinezB
Copy link

There was a reported issue with the "longid()" and "shortid()" methods of the Verbnet.py file. Basically, there are two types of ID, short id (eg. 32.5) and long id(eg. example-32.5). The methods involved change a short id to a long id and vice versa. The problem was that verbnet.longid("114-1") is supposed to return the long id "act-114-1", but it instead returns "114-1". This issue was solved by changing the Regex pattern to match the id types while still passing the tests for all other cases.

The change in the long id Regex pattern was:

_LONGID_RE = re.compile(r"([^\-\.]*)-([\d+.-]+)$") ------> LONGID_RE = re.compile(r"([A-Za-z]+)-([\d.-]+)$")

The new pattern tries to match an alphabetic sequence first (without considering empty sequences), then to match a minus sign "-" and finally the associated short id.

@tomaarsen
Copy link
Member

tomaarsen commented Jul 18, 2022

Please have a look at the failing tests, e.g. these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants