Replies: 1 comment 1 reply
-
I think you want to extends: sequence
message: "Don't use '%s'."
tokens:
- pattern: following
- tag: NN|NNS|NNP|NNPS
negate: true |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't work much with NLTK so might be missing something fundamental.
I'd like to write a rule that identifies "following" when it is not followed by a noun. I fully expect to have to tune this later, but for now I just want to get going. E.g.,
These statements are fine, and should not trigger any rules:
"Refer to the following list:"
"The following statements are valid:"
These and similar statements should trigger the rule:
"Refer to the following:"
"The following are common solutions:"
I've been trying to do this by using the sequence extension:
I haven't worked out how to identify punctuation yet; one thing at a time.
I'd really appreciate any help.
Thanks a lot.
David
Beta Was this translation helpful? Give feedback.
All reactions