dishmint / LexicalCases

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

Strange match span #328

Open dishmint opened 2 months ago

dishmint commented 2 months ago

I don't understand why coolcar.cool was matched as an adjective.

In[107]:= 
LexicalCases["coolcar.cool car", 
  TypeToken["Adjective"] ~~ " car"]["Data"]

Out[107]= {<|"Match" -> "coolcar.cool car", "Position" -> {{1, 16}}|>}
dishmint commented 2 months ago

This means the model is not identifying canonical Adjectives, but inferring them.

dishmint commented 1 month ago
In[9]:= ExpandPattern["coolcar.cool car", TypeToken["Adjective"]] 

Out[9]= "coolcar.cool"

In[10]:= ExpandPattern["coolcar cool car", TypeToken["Adjective"]]

Out[10]= "cool"