Using Matcher for each sentence #9304
-
I am using token matching for my doc object and I notice it is matching tokens from different sentences too. I am using this code right now, but I think it would significantly slow down the process
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is not an option you can give the Matcher that will make it only match within sentences. I think the way you are doing this is the most straightforward way and shouldn't be too slow. Have you tried it to see how much slower it gets? There is one other thing you could do. Matcher patterns can match on the |
Beta Was this translation helpful? Give feedback.
There is not an option you can give the Matcher that will make it only match within sentences. I think the way you are doing this is the most straightforward way and shouldn't be too slow. Have you tried it to see how much slower it gets?
There is one other thing you could do. Matcher patterns can match on the
IS_SENT_START
attribute, so you could specify that for every token after the first that needs to beFalse
. However I think specifying that would be more complicated and hard to understand.