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

learn more… | top users | synonyms

6
votes
2answers
2k views

How to export results of an analysis in table format into MS word file

I'm working on a simulation study using Mathematica 8. At the end of the analysis I'll have a matrix of data containing my results (assume for three variables like x,y & z). I used these codes for ...
6
votes
2answers
999 views

Formatted text in a Dynamic or Manipulate control

I am using a Manipulate control to show different calculations for the same user-specified parameters. I would like to show the results for the calculation the ...
6
votes
2answers
707 views

Text[] using Graphics

...
6
votes
2answers
1k views

rotating 3d text

Is it possible to create a 3d rotating text like this: animation here. Here is my try so far: ...
6
votes
1answer
205 views

How to type sentences into Mathematica

I am writing a paper and in conjunction with the paper I want to submit a Mathematica file that shows the numerical calculations. But I want it to follow in order of the paper. I know this is ...
6
votes
1answer
170 views

Using Padding with Text and Style

Suppose that I use: Text[Style["(1, 0, 0)", 12, Background -> White], {1, 1, 0}] How can I put a few points of padding around the text? Thanks to Jens: ...
6
votes
1answer
376 views

Interpreting text entry and splitting it in a Manipulate text field?

I have the following program that plots the number of trigram appearances across a corpus of textual information between 1964 and 1989 (apologies for the messy code): ...
6
votes
1answer
97 views

Wordcloud creates a messy image

I'm trying to use Wordcloud built in function (I'm using v10.3.0.0) but the result is not good. I'm using a list with expressions and respective weights: ...
6
votes
1answer
101 views

Searching for literal strings with TextSearch

The documentation indicates that TextSearch can be used to look for a "literal string" inside documents, but it appears Mathematica may be applying a regex-style ...
6
votes
1answer
126 views

Finding quotations in a text

I actually deal with the problem of finding quotations (i.e. "this is a quotation") in larger texts of different languages, mostly German and English. Unfortunately there are several ways to fill text ...
6
votes
1answer
182 views

How do you force line spacing to be uniform when a line contains characters with vector or overdot?

A persistent problem I've run into is that certain character decorations within the text of a paragraph will often add extra line spacing even if there is already plenty of space between lines. This ...
5
votes
3answers
173 views

Comparing Unequal Lists of Surnames to Establish Over or Under-Representation

I've been using Mathematica to explore historical records. I have two long lists (one is 69k, the second 17k) of unequal length. They are like so (FWIW, the first list is the first 40 entries from the ...
5
votes
2answers
185 views

Using StringCases and treating certain phrases as single words

My question is about StringCases. When I use this function, each word is separated by a ,. But I want some noun phrases like ...
5
votes
2answers
229 views

Cleaning up a List of HTML Data to Render Usable Information

I am using Mathematica to scrape information from webpages. To get file information, I am gathering plain text that is enclosed by <tr> and ...
5
votes
3answers
195 views

DeleteStopwords in other languages?

I saw that in new version of Mathematica there is an interesting function: DeleteStopwords that deletes stopwords from a list of words, but this function is only ...
5
votes
1answer
418 views

Sorting an Array with words in different languages

Array consists of words of different languages. I need to sort elements in reverse alphabetical order and make a list of elements, which consist of english letters. Example of array which consist of ...
5
votes
2answers
708 views

Can I frame text in a plot to look like legend?

I have a DateListPlot, much the same as below, that I want to overlay text onto. I'd like the text to be wrapped in a frame much the same way as the legend box is, ...
5
votes
1answer
40 views

How to specify the text size of a vertex index in a 3D mesh using Labeled

My code takes a list of {x, y, z} vertices and displays a convex hull with each vertex labeled by its index in the list. Here is a minimal working example of the ...
5
votes
1answer
139 views

Text formatting with different wrappers

Formatting text in Mathematica should be a punishment for serious crimes. I've face another frustrating feature, and I don't know how to get rid of it. ...
4
votes
2answers
913 views

Single dot textual form

How do I render a letter with a single dot above it? I see \[DoubleDot] and \[TripleDot] are readily available, but what about ...
4
votes
2answers
194 views

Character display color

I'm looking to cause the front end to display individual characters in a specific color, just in general, as a default sort of thing. For instance, the character "1" would always display as a red 1, ...
4
votes
3answers
100 views

How create text label of form “var = ”, var properly formatted

If I use z = 99; Row[{TraditionalForm@HoldForm[z == 1], z}] then as output I get a property formatted math expression $z = 199$. How do I accomplish the ...
4
votes
2answers
154 views

Printing every other line from input text

I am trying to do some text manipulation in Mathematica. After importing a text file (in.txt) as a string, how would you then output every other line? In the ...
4
votes
1answer
259 views

DensityHistogram label/display values in Mathematica 8

I'm trying to make a DensityHistogram in Mathematica 8 that overlays the histogram values for each location. What I want is for the value of each square to be ...
4
votes
2answers
193 views

In a list, exclude words that use too many specific letters

Trying to re-rwite for clarity. Referring to my previous lists: I would like to trim a dictionary so that all words that "consume" more than n letters "x" are ...
4
votes
1answer
617 views

How to make new line in mathematica file output?

I know that new line is classically made by "\n". I want to make a string with lines of data and then export it into a file: ...
4
votes
3answers
537 views

Text with subscript is automatically Italic

I am creating a figure for a document using Graphics in which there is Text with some variables and again those same variables ...
4
votes
1answer
710 views

How do I remove single-character whitespace between words, leaving multiple, contiguous, whitespace characters unchanged?

In a string, I want to remove only the single-character whitespace between printing characters, leaving any multiple, contiguous, whitespace characters between printing characters unchanged? What is ...
4
votes
1answer
74 views

Classifying text and number features

I am new to the ML algorithms and I am checking the Classify function of Mathematica. I understand the math for the random forest algorithm, but I have a question ...
4
votes
1answer
404 views

problem exporting eps figures since mathematica 10

I am having trouble when exporting eps figures since I have upgraded to mathematica 10.0 in linux. Basically the text in the frame label and in the frameticks come out bad. The letters are much to ...
3
votes
2answers
2k views

Importing .txt or .csv financial data

I am trying to import some financial data exported from Excel. You can find the relevant file here : Text File or CSV File This is what the data looks like in Excel : Using the following code to ...
3
votes
5answers
542 views

How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably?

How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably? This means if I have ...
3
votes
2answers
2k views

How can I italicize FrameLabel directives?

Suppose that I use Frame -> True in Plot. Then I can use ...
3
votes
2answers
2k views

3D scatter plot from a txt file

I have a txt file with space-delimited x, y, z coordinates of several points. The points are organized into groups of unequal size; the groups are delimited by skipping a line, like this: ...
3
votes
1answer
109 views

Problem with deleting words from text [closed]

The task I need to do is to import a text book from here http://www.gutenberg.org/cache/epub/36/pg36.txt, then drop the last 20000 words from it and determine how many times the remaining words occur. ...
3
votes
2answers
118 views

Adding Text to a ListLogLinearPlot [duplicate]

I have a problem with adding text to a ListLogLinearPlot plot. The text just doesn't show up anywhere. If I use the normal ListPlot, the text coordinates go perfectly wherever I want them to: ...
3
votes
1answer
447 views

how to delete specific data from text file and then update it

I have a large text file. I read data from text file one at a time and check whether data agree with my condition. If not I want to delete that data in text file and update it. For example say my ...
3
votes
2answers
124 views

How to show and hide text by a button

I'm trying to implement a button that can show and hide output text in a panel/tab, but I can't find a specific command to do that. I tried StringReplace, but it doesn't work for me.
3
votes
2answers
160 views

Alignement of text

I adopted the following clever code from Mr. Wizard (see here ). HoldForm[+##] & @@ RandomInteger[100, 2] I want to prepare a practising table of addition ...
3
votes
3answers
242 views

Generating a list of questions (simultaneous equations)

I am trying to create a list of simultaneous equations showing steps, where I only need to change a, b and the question number, and maybe a couple of minor things about q (where q is the factored ...
3
votes
2answers
54 views

How to get highlighted text from event

I want to do the following: Given a text in a Mathematica dynamic module "at runtime". If some text is selected with the cursor/mouse, after the mouse button release, get the selected text. Thank ...
3
votes
1answer
206 views

Keeping Font Relative Size to Object/Graphics/Plot Object upon Resize

I want to keep the text generated within a graph/plot to remain the same relative to an element (a disk of size 0.2) of the image upon resize, not the image itself, while maintaining the original ...
3
votes
2answers
147 views

Expand Graphics based on all elements

How might I force the following Graphics element to expand to contain the Inset text? ...
3
votes
1answer
75 views

How to align text to left and output to right, in manipulate?

I need to show a layer of information on a 3D graphics, inside a manipulate box. Currently, all the code is working great, except that the text should be aligned to the left, while the output numbers ...
3
votes
3answers
597 views

When exporting text, how can I set the line separator?

I want to export a string for a bash script. The terminal is naturally very picky when it comes down to the "\n\r" vs "\n", Windows vs. Linux, new line issue. How can I teach Mathematica to use "\n" ...
3
votes
1answer
558 views

Importing file with UCS-2 Little Endian codification

I'm trying to import a text file with UCS-2 Little Endian codification but I can't read it correctly. There's any hidden option to read this files ?? I'd tried with ...
3
votes
1answer
35 views

Skipping commented in a stream from OpenRead

Is there a solution to skip comments in text files that are imported with OpenRead? I know there are solutions for Importand <...
3
votes
1answer
81 views

Finding all Spanish words with given vowel patterns

I'm trying to implement a function using DictionaryLookup that does the following: Uses a Spanish dictionary Lists and counts of all words where the 5 vowels ...
3
votes
1answer
253 views

How to fill a whole rectangle with text?

I have a rectangle with specified dimensions and I'd like to fill it with text, so that the text uses all (well, as much as possible) of the available area. I tried to do it with ...
3
votes
0answers
81 views

How to include automatic references to cells styled with DisplayFormulaNumbered

Under the Style menu, there is an entry called DisplayFormulaNumbered. It does exactly what it seems to suggest: it indexes the ...