dishmint / LexicalCases

Extract substrings matching a lexical pattern
https://www.paclets.com/FaizonZaman/LexicalCases
MIT License
2 stars 0 forks source link

ToLexicalPattern trimmed whitespace when preserving tokens #327

Closed dishmint closed 2 months ago

dishmint commented 3 months ago

Notice that grocerystore lost the white space.

Image

dishmint commented 3 months ago

It's because the generated pattern doesn't include whitespace.

See also:

In[100]:= FormatLexicalPattern[lp]

Out[100]= "PRONOUNVERBPREPOSITIONDETERMINERNOUNNOUNPUNCTUATION"
dishmint commented 2 months ago

Works now

In[13]:= FormatLexicalPattern[lexpatt]

Out[13]= "PRONOUN VERB PREPOSITION DETERMINER grocery store."