Skip to main content

Questions tagged [natural-language]

Questions about natural language input or text processing.

Filter by
Sorted by
Tagged with
17 votes
1 answer
552 views

Programming of a natural language interface

I've just started using the Mathematica natural language interface and found it very interesting. After doing some research, I found some documentation on the "Programmable Linguistic Interface": ...
Burton Samograd's user avatar
12 votes
3 answers
2k views

Convert number to word

I have a big number like: 123 456 789. Now I'll to writ it like this 123 million 456 thousand 789 I've search on the internet but nothing found that works. How can you do that? Thanks.
Mark's user avatar
  • 145
12 votes
2 answers
615 views

Comparing natural language strings

I have a large spreadsheet with thousands of rows/columns of text. Some are saying essentially the same thing but in different ways. When you enter a natural language question Wolfram Alpha makes a ...
Robert's user avatar
  • 435
10 votes
2 answers
419 views

Unscrambling jumbled anagrams

I know that we can easily check to see if a string contains any anagrams by the following snippet: ...
Landak's user avatar
  • 203
10 votes
2 answers
345 views

Removing banal words from a list

NB: I am aware of the DeleteStopwords symbol. I want to remove from a list of words the ones that are likely to be more banal. So for instance if we have ...
Diffycue's user avatar
  • 1,844
9 votes
3 answers
573 views

Number of capital letters

I am interested in counting a number of uppercase letters in the text. I do it in the following manner. ...
Kiril Danilchenko's user avatar
9 votes
1 answer
1k views

How to find multi-word synonyms?

I’m looking to write a semantic distance function for phrases (5 words or less) that can map multi-word synonyms together. My domain is e-commerce fashion - here are some required examples for a ...
M.R.'s user avatar
  • 31.6k
7 votes
1 answer
464 views

A strange verb from Mathematica's WordList

The first word returned by WordList["Verb"] is "aah", even though I think it actually an interjection, I still wonder whether ...
Αλέξανδρος Ζεγγ's user avatar
7 votes
1 answer
285 views

Decoding Music in Staff Notation using ImageIdentify

I wrote this Code fragment Which is a E (quarter) note in Treble Clef. Instead Mathematica simply classified it as a "musical note" Can we do better?
Quasar Supernova's user avatar
7 votes
0 answers
214 views

How to train custom named entity recognition?

Version 12 has basic NER support for some entities, but how does one recognize a custom entity? For example, I want to parse text describing products, and parse out three entities: prices, size, and ...
M.R.'s user avatar
  • 31.6k
7 votes
0 answers
194 views

How to import unsupported language dictionaries?

Mathematica seems to only know about these 27 languages: However, I need access to dictionaries for other languages, namely Romanian and Japanese. Now, WordList ...
user5601's user avatar
  • 3,695
6 votes
1 answer
148 views

How can I tell the WL auto-magic date interpreter to use a day-first interpretation if there is ambiguity?

I know you can use DateObject[{"05-08-2022", {"Day", "Month", "Year" }}] to tell WL the date format explicitly, but a rigid ...
Sjoerd Smit's user avatar
6 votes
1 answer
180 views

Counting a part of the speech in a sentence

I want to count a number of nouns in a sentence. For that, I'm using TextStructere but I don't know how to get tags of each word.
Kiril Danilchenko's user avatar
6 votes
2 answers
244 views

Average length (in words) of paragraphs in document

I try to calculate the average length (in words) of paragraphs in a document. The data look like: ...
Kiril Danilchenko's user avatar
6 votes
2 answers
658 views

Bigrams and TF-IDF calculation

I want to create a bag of bigrams in a set of documents and calculate the TF-IDF vector of each document. To calculate the bigram of the text I used the following code: The small example of the data (...
Kiril Danilchenko's user avatar
6 votes
1 answer
338 views

Named entity recognition

How can one process natural language (English) to extract named entities (aka NER)? Or at least, entities which can be mapped to a Mathematica Entity. Note that trying to map entities via simple ...
Francois Vanderseypen's user avatar
6 votes
0 answers
268 views

Any competitive speech-to-text models?

SpeechRecognize is not very useful compared to most voice transcription engines nowadays, simply too fragile and prone to errors. I use Otter.ai currently, is there anything competitive to that (or ...
user5601's user avatar
  • 3,695
6 votes
0 answers
100 views

An efficient way to extract Dependency Strings from a sentence

Mathematica has the built-in function TextStructure, with the option "DependencyStrings" that provides the dependency strings of a sentence. Unfortunately, this function is incredibly slow. ...
Tim B's user avatar
  • 547
5 votes
2 answers
296 views

Split up word pairs in string based on semantic textual analysis

I have several hundred sentence-strings with joined words. They were extracted from a text (and are in sequence). Here is an example of one: ...
Conor Cosnett's user avatar
5 votes
2 answers
163 views

Parts of speech tags in a list?

Given the sentence "The cat sat on the mat.", I want the list of tuples: ...
user5601's user avatar
  • 3,695
5 votes
1 answer
198 views

Languages/scripts supported by Alphabet[]

How can I get the full list of languages/scripts/alphabets supported by the Alphabet function? Note that while the auto-completion suggests many possibilities, it ...
Szabolcs's user avatar
  • 236k
5 votes
1 answer
427 views

How to paraphrase text?

I'm looking to train or use pre-trained models in order to re-phrase text. Are there any natural language models in the Wolfram Neural Repository (or elsewhere) that can be used to paraphrase text? ...
user5601's user avatar
  • 3,695
5 votes
0 answers
171 views

Modern topic modeling?

This question was asked in 2014: How to perform document classification (i.e. extracting topics from text)? At the time user @V.E. gave a great little tutorial on LDA, but today, there's still no ...
M.R.'s user avatar
  • 31.6k
4 votes
1 answer
363 views

Delete all French stopwords [duplicate]

I have a list of french stopwords: ...
james's user avatar
  • 3,093
4 votes
1 answer
833 views

Difference between free-form input via WolframAlpha[] and CTRL+=

WolframAlpha["query"] - https://reference.wolfram.com/language/ref/WolframAlpha.html Free-form input - https://reference.wolfram.com/language/workflow/EnterFreeFormInput.html For example: ...
vasili111's user avatar
  • 1,225
4 votes
1 answer
183 views

Manually plotting the 'sheep curve'

There are a number of 'popular' parametric plots that draw recognisable pictures - of course I must learn more about the 'sheep curve'. It's straightforward to 'find' them using a natural language ...
Joe's user avatar
  • 1,487
4 votes
1 answer
92 views

Assigning probabilities to an Autocomplete function

I have created an autocomplete function based on WordList. auto = Autocomplete[WordList["KnownWords"]] And if I use this on the letters "ga", it will provide me ...
Tim B's user avatar
  • 547
4 votes
0 answers
120 views

Can Mathematica show Hebrew,Arabic and Persian languages correctly?

Right to left languages don't show correctly in Mathematica ,is there a way to type RTL languages without them being reversed?
Hamid's user avatar
  • 41
4 votes
0 answers
167 views

Can someone help me to understand sequence-to-sequence transformation using (Wolfram-specific) recurrent neural nets?

I've been learning about recurrent neural networks lately and I think I'm starting to get the basic idea of how they work. I'm particularly interested in the sequence transformation capabilities of ...
Euphor's user avatar
  • 41
3 votes
1 answer
184 views

Specify NetEncode's tokenization model?

NetEncoder[{"Tokens"}] uses WordData indices to tokenize an input string. But is there a way to tell ...
M.R.'s user avatar
  • 31.6k
3 votes
1 answer
392 views

Entering natural language input in WolframScript

What is the equivalent of typing = at the beginning of a line to specify natural language input in WolframScript?
DurandA's user avatar
  • 161
3 votes
2 answers
1k views

Answer multiple choice questions

FindTextualAnswer isn't working for me here: ...
M.R.'s user avatar
  • 31.6k
3 votes
1 answer
239 views

How to get free-form linguistic input to act on a previous output?

It seems that Mathematica is capable of taking free-form input that acts on previous outputs (see "separate color channels"), but I'm having trouble getting it to work in my case. I've got ...
sblom's user avatar
  • 6,473
3 votes
0 answers
122 views

FeatureExtraction[] for text -- to normalize text or not?

The title pretty much captures my question. When I use FeatureExtraction[] for text, should I normalize text before parsing it through ...
dearN's user avatar
  • 5,351
3 votes
0 answers
112 views

NLP in non-english languages possible?

I would like to use Mathematica NLP functions to analyze texts in French. I haven’t found any documentation on how good it will be compared to english (and if it’s even possible to use non-english ...
Sulli's user avatar
  • 2,215
3 votes
0 answers
435 views

Mixing Wolfram Language & WolframAlpha Queries - How robust is it?

The advent of Mathematica in the cloud and linguistic input potentially transforms expectations of the Wolfram Language's programming model and its inherent robustness. An example of this comes form ...
Ronald Monson's user avatar
2 votes
1 answer
171 views

How do I test that a string is a sentence? [closed]

For example, consider string = "this is a sentence." The best way I can think about is DictionaryWordQ. However, <...
kile's user avatar
  • 1,671
2 votes
2 answers
265 views

Searching words with the five vowels

after looking for a long time manually words in Spanish that have the five vowels in any order, for example Republicano, murcielago, superiora, etc; I'm bored and without success. I thought that ...
bullitohappy's user avatar
  • 1,289
2 votes
1 answer
133 views

How to identify gender and family roles of characters in novel excerpts?

I am playing with Natural language programming in Mathematica, and can't figure out how to extract the entity classes (i.e. male, female) for the following example text: "This was a pleasant ...
MiKK's user avatar
  • 563
2 votes
0 answers
77 views

Extracting Parts of Speech

I am looking to parse the ConstituentsTree from TextStructure. Someone already asked how to get the proper nouns out of a text here: Extract names from a document I am looking for a more general ...
Connor's user avatar
  • 41
2 votes
0 answers
69 views

Confusing behavior for GrammarRules and GrammarApply

I have been experimenting with GrammarRules in an attempt to create a parser for text downloaded from the web. I have been using Interpreter to help understand the behavior of GrammarApply. Here is a ...
Mike Colacino's user avatar
2 votes
0 answers
226 views

Sentimental Analysis Classification Problem [closed]

I am keen on working with Mathematica for my sentimental analysis project. I have just started and been working around with some examples. During which I found: ...
Ravi Sankar's user avatar
2 votes
0 answers
70 views

Another question on Mma data sources/syntax

Let's say I want to have the vapor pressure of mercury, as a function of temperature. I know that this information is available, for any specific temperature, from Wolfram Alpha, and I can also get ...
Pirx's user avatar
  • 4,149
1 vote
1 answer
75 views

Can WordFrequencyData run faster?

I want the WordFrequencyData of the whole WordList[] However it takes too long to get the result. ...
Patchouli Nine's user avatar
1 vote
1 answer
192 views

Plot with Wolfram Alpha Scientific Data

Now that Mathematica has already embedded Wolfram Alpha, so I'd like to plot a graph: "Air Density" - "Elevation". I know that yields But I can't do that 10000 ...
user155860's user avatar
1 vote
1 answer
85 views

Why does Entity Class return an empty value sometimes?

I am working on computing the 20 largest cities in California. ...
Peter Burbery's user avatar
1 vote
0 answers
92 views

How to find N most populous cities in each state with TakeLargest and Entity Functions without waiting forever using Caching?

I am interested in using Entity Functions such as EntityValue, FilteredEntityClass, EntityFunction, EntityClass, EntityList, and GeoEntities to help me find N most populous cities in each state. I ...
Peter Burbery's user avatar
1 vote
2 answers
225 views

Finding position of specific substring within string [closed]

Is there a simple way of finding the position of a specific instance of a substring within a string? For instance, in the sentence "Bob bought his car at the car dealership". Something like <...
Mualpha7's user avatar
1 vote
0 answers
48 views

SpellingCorrectionList for custom language (Italian)

SpellingCorrectionList["ciao",Language -> Italian] Says there are no Spelling dictionaries for Italian. On the other hand, ...
Fortsaint's user avatar
  • 2,060
1 vote
0 answers
209 views

Why do I get different results for the same input specified using natural language phrasing? [closed]

One of the comments to Stephen Wolfram's blog post on Ada Lovelace, mentioned that WolframAlpha (and verified in Mathematica as well) provided slightly different results for the question of Ada's age ...
Adrian's user avatar
  • 377