Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Extract lexical patterns from text
Contributed By: Faizon Zaman
Search text for lexical patterns. While similar to StringCases, TextCases etc., content types can be used freely in a StringExpression (as opposed to expressing complex lexical patterns in a Containing wrapper). Files, search index objects, and Wikipedia queries are supported. Results are returned in a summary object which supports several subvalues. Consult the documentation for usage.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["FaizonZaman/LexicalCases"]
Search for verb phrases beginning with "Alice" in "Alice in Wonderland":
In[1]:= | ![]() |
In[2]:= | ![]() |
Out[2]= | ![]() |
In[3]:= | ![]() |
Out[3]= | ![]() |
In[4]:= | ![]() |
Out[4]= | ![]() |
Search for a lexical pattern in Wikipedia articles containing "darwin":
In[5]:= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Search over index objects:
In[7]:= | ![]() |
Out[7]= | ![]() |
In[8]:= | ![]() |
Visualize the results in a WordCloud:
In[9]:= | ![]() |
Out[9]= | ![]() |
Wolfram Language Version 12.3