Make sentence parser works for spaced languages #1624
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since all terms are trimmed after processed by the parser and the option
Show space between parsed words
only adds a right margin instead of a space, all words are clumped together so whole word scan will not work.Although it's not recommended to use sentence parser for spaced languages, some users may have this on. I've fixed to make this at least work by adding a space between the terms. The option
Show space between parsed words
will be hidden and default to true for spaced languages. The only use case that I find marginally useful is that it makes recognizing terms with more than 1 words easier.For example, we can see that all terms are widely spaced by
space character + margin
, socome back
is easily recognized as a term.If this is not worth it, then we can consider disable the parser and hide the settings for spaced languages.