Questions tagged [text]

Questions relating to working with textual information: textual analysis, data mining, etc.

This tag should be used for questions that primarily involve using textual information. Questions could relate to textual analysis, data mining, or exporting and importing textual data.

Use the or tags for issues relating to StringForm and converting strings into other forms. Use the accompanying tags , if the question is about export/import of text. If your question is about how to put text into graphics using Text, please use the tag or instead.

Useful links:

370 questions
10
votes
1 answer

Is it possible to type equations as text in Mathematica?

I was wondering if I could write an equation, symbolically, but only as part of a text in Mathematica. So I don't want Mathematica to consider anything inside that equation as a variable, nor equate or perform any mathematics on it. Is that…
stupidity
  • 359
  • 4
  • 9
7
votes
1 answer

Compare two texts and find differences and similarities

I would like to compare two texts and try to find their degree of similarity and highlight the differences. I would like to do this, not only in terms of words, but also sentences/context, if it could be possible. I thought of using…
still_learning
  • 207
  • 1
  • 5
4
votes
2 answers

How to split a text into paragraphs?

I would like to ask you how to split the following texts into 4 paragraphs. These are two documents, one starts with "It's official...", and the other one with ",CNN...". text = {"It's official: U.S. President Barack Obama wants lawmakers to weigh…
Math
  • 177
  • 6
3
votes
3 answers

Why is Mathematica treating my text as input?

I have typed in some text input by using Alt-7 to convert everything into text, but why is text still evaluated? Or is there better way to make comments other than (* text here *), because in my text there are numbers and it is also evaluating them…
sebastian c.
  • 1,973
  • 2
  • 18
  • 27
2
votes
1 answer

Shortcut to insert plaintext?

Oftentimes I would find it useful to insert plaintext, to not be evaluated as input, right next to my input code. Is there a shortcut key to insert such a plaintext input box? I have relied on comments (shortcut key Alt+/), but as I use a…
Identity
  • 263
  • 3
  • 9
2
votes
1 answer

How to select elements from a dataset?

I am having difficulties to extract some elements from a dataset. I imported the .csv file in Mathematica using the following line of code: emails = Import[ "/Users/Desktop/Spam/email.csv", { "Dataset", All}] and it looks like Then I tried to…
Math
  • 177
  • 6
2
votes
1 answer

Import and rearrange txt file

I have a txt file like this: A B C 400 2 3 2 1 8 Now I would like to import the txt file and write it all on one line instead of in columns, so like that: A B C 400 2 3 2 1 8 How can I achieve this with Mathematica ?
james
  • 3,043
  • 13
  • 29
1
vote
1 answer

Why does WordStem return different results for "abacus" and "abacuses"?

I just noticed the following: WordStem["abacus"] (* abacu *) WordStem["abacuses"] (* abacus *) WordStem["cactus"] (* cactu *) WordStem["cactuses"] (* cactus *) Is this how word stemming works? Or is this a bug in Mathematica?
Shredderroy
  • 5,249
  • 17
  • 26
1
vote
2 answers

Colorful and eyecandy text by Mathematica

I want to present my work somewhere and thus I made a Powerpoint presentation. I am wondering if it is possible to make a colorful and stylish text by MMA. For example at the end of my presentation I write phrases such as "Thank you for your…
MOON
  • 3,864
  • 23
  • 49
1
vote
1 answer

How do I include both text and variables in Input[ ]?

I want to prompt a user to input an answer to a question. I want the question that pops up to have both text and numbers or strings. For example, if I ask the user to give a name to something in the first question, I want the next question to…
Benjamin
  • 13
  • 3
1
vote
0 answers

How can I get information from the ads within a website?

Is there any function that identifies ads on a website? I would like to analyze them but I do not know how by using Mathematica.
Math
  • 177
  • 6
1
vote
1 answer

How to run a function for each item in a list?

I would like to ask you how I could implement a function that for each string in a list execute something. This should be the case: list={"a", "upon", "time", "once", ...} What I am trying to do is removing from a text, example= {"once upon a…
Val
  • 225
  • 1
  • 6
1
vote
1 answer

Get a snippet from a sentence that contains a number of interest

I have the following problem. I want to get a snippet from a text that contains a number, which I am interested in: Sentence: {"My phone number is 1234567 and my social security number is 98765433."} where I know that I want the following snippets…
Coffee_09
  • 177
  • 6
1
vote
0 answers

Words weighting with TF-IDF (updated with cleaned code)

I have a raw dataset under this form : {{label1,sentence1},{label2,sentence2}.....} Sample here: sample available here also I am trying to apply TF-IDF: putting the number of times that a word appears in a sentence (term frequency) in relation to…
1
vote
1 answer

How can I create a word consisting of sequence of letters which produce the word?

I found today at the web site of the Wolfram Programming Lab the following Code which can create a Pi symbol filled with the digits of Pi: With[ { pos = PixelValuePositions[ Rasterize@ Text@Style[Pi, 90, {FontWeight -> "Bold",…
mrz
  • 11,686
  • 2
  • 25
  • 81
1
2