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

[folia] word.previous() violates constraint when given an explicit constraint like Sentence #26

Closed
proycon opened this issue Dec 12, 2016 · 0 comments
Assignees
Milestone

Comments

@proycon
Copy link
Owner

proycon commented Dec 12, 2016

I’ve encountered some problem with the usage of previous() in Folia 
As far as I see if the token is the first word of the sentence, and doesn’t return None, instead, it returns the last word of the previous sentence and sometimes even a word before that
and by the way, I explicitly define the sentence as a constraint like this : token.previous(folia.Word, [folia.Sentence])
This works well for the next, it returns None for the next token if the current token is the last word of a sentence. So “token.next(folia.Word, [folia.Sentence])“ works well
here are my observations:
flooding . None
 --------------------
 Prev | Token | Next
 --------------------
 flooding There was
here ‘flooding’ is the last word in the first sentence, and ‘There’ is the first word in the second sentence)
and for your information, previous() sometimes returns even before than the last word of the previous sentence
Here is the exapmle I’ve seen;
two days of
days of intense
of intense rainfall
intense rainfall .
rainfall . None
--------------------
Prev | Token | Next
--------------------
days A very
A very slow-moving
very slow-moving lo
@proycon proycon added the bug label Dec 12, 2016
@proycon proycon self-assigned this Dec 12, 2016
@proycon proycon added this to the v1.1.1 milestone Dec 12, 2016
@proycon proycon closed this as completed Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant