Tagged Questions

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

learn more… | top users | synonyms

5
votes
1answer
345 views

What is the proper way to extract XMLElement values?

I have seen and tried many different versions of XML data parsing here on this forum, and even some in the documentation. Is there a tried and true "Best Practice" way to extract all the XMLElement ...
4
votes
2answers
173 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, ...
7
votes
2answers
277 views

Convert quoted printable aka PrintableASCII characters to UTF-8

I have several .eml email files to import. Some of them were saved as quoted-printable 7-bit encoded. I skipped through the Mathematica documentation and found ...
5
votes
2answers
1k 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 ...
-3
votes
1answer
136 views

Mathematica output in ASCII or larger text size for the output?

I am trying to read the output of this code that has crosses, circles and spaces. For some reason, the output is in very-very small alphabets so I would like to get it in ASCII and/or in larger ...
4
votes
2answers
575 views

rotating 3d text

Is it possible to create a 3d rotating text like this: animation here. Here is my try so far: ...
11
votes
5answers
763 views

Determine the Number of Lines in a Text File

I have looked and looked but I do not see a simple efficient way to get MMA to return the number of lines in a text file? I thought about reading the file until it returned the EOF marker, but that ...
2
votes
1answer
163 views

diff-able text-only notebooks?

I would like to save my Mathematica notebooks as plain-text documents, so that I can keep them under git version control. I thought that ...
0
votes
2answers
143 views

Iterating Reads From a Text File and Writing the Results of Operation

I have a very large text (TSV) file. I am able to now read single line, thanks to StackExchange. I am able to read a part of that line using the part operator. I want to iterate through the whole ...
3
votes
3answers
4k views

Label points in plot with a text

I'm a newbie at Mathematica and I couldn't find how to label the maximum and the zero of a simple function in Plot with their names: ...
14
votes
2answers
307 views

Haiku Extractor

Inspired by the cool Tumblr Haiku Times that searches for accidental haiku in New York Times articles, I tried my hand at implementing such a search in Mathematica for my own text samples. I'm still ...
2
votes
0answers
82 views

Exporting large numbers to a text file [duplicate]

I need to export large numbers to an ASCII text file, but as simple digits without powers of ten, e.g. I need to write 123456.789 to the file and not 1.23456789E10^5. It seems like such a simple ...
6
votes
1answer
135 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 ...
3
votes
2answers
745 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: ...
10
votes
1answer
413 views

Poor anti-aliasing in Rotated text with ClearType on

There is a problem on my system that occurs when text is rotated 90 degrees as it is in frame labels. This only happens when ClearType is turned on, and only around 90 degrees of rotation. I am ...
9
votes
1answer
1k views

What is the full list of all font families?

I'm having trouble finding a complete list of the FontFamily strings that mathematica supports.
1
vote
1answer
157 views

Spacer and Text in Graphics going Awry (in Mathematica 7)

Use of a vertical Spacer in justified text inside a graphic isn't working as required. The result in the green box looks right, but when this is placed in a ...
3
votes
5answers
367 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 ...
0
votes
2answers
365 views

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 ...
21
votes
2answers
659 views

Movable text on a curve

Having an arbitrary curve defined as InterpolatingFunction, what is the best way to place a text on this curve? The text generally has two rows, for example: ...
1
vote
1answer
493 views

Importing formatted, highlighted text from : HTML vs RTF vs. XML

We would like the ability to import and analyze ASCII documents that have been manually segmented by highlighting and changing font colors of various sections, eg: The original line breaks, ...
3
votes
0answers
126 views

Unicode beyond Basic Multilingual Plane

String manipulation takes a dive when characters beyond \:FFFF are used e.g. Mathematical Alphanumeric Symbols. The characters display fine but doing string ...
6
votes
2answers
471 views

How can I convert a formatted text cell to latex code?

I have a formatted text cell, I want to export it as latex. How can I do that? Since copy as LaTeX doesn't work, I thought of pasting it into a string and exporting, but it's a no go: ...
6
votes
4answers
278 views

Where can I take a pool of words from?

Dear Community members, I am thinking about an interactive machine to teach a school child to write difficult words correctly. As a first step I need a collection of words. I will select a pool of ...
5
votes
3answers
161 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
465 views

Rotated text in “plot” cannot be copied to MS Word

When I add some text to a simple plot with drawing tools, the text cannot be copied and pasted out with the graphic itself to Microsoft Word. Do you know how to copy the manually added text out to ...
7
votes
2answers
258 views

How to Rasterize in “Printout” style

I am trying to ascertain how large a justified text block will be when printed by rasterizing it in the "Printout" style environment. However, ...
3
votes
1answer
364 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 ...
15
votes
3answers
460 views

Grabbing a number of characters around a string pattern

If I have some string data: text = StringTake[ExampleData[{"Text", "DeclarationOfIndependence"}], 400] "When in the Course of human events, it becomes ...
11
votes
2answers
391 views

Word Squares and Beyond

A word square is a set of words which, when placed in a grid, read the same horizontally and vertically. For example, the following is an English word square of order 5: ...
2
votes
2answers
835 views

How can I italicize FrameLabel directives?

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

Is there a way to outline text?

If I have: Graphics[ {Red, EdgeForm[Directive[White, Thick]], Inset[Style[Text@"Hi!", 44], {0, 0}]}, Background -> Black ] I unfortunately get: ...
2
votes
2answers
194 views

Manipulating spacing in a text object

I want to visually illustrate substitution in a mathematical expression. This is an example: ...
8
votes
5answers
318 views

How to resize the text content of a grid with it?

I am in a resizing mood these days. This code works quite well, up to a point. ...
6
votes
2answers
709 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 ...
11
votes
2answers
2k views

How to dynamically name and date a file for export?

I have various functions that export Excel and text files, and need to have them named with a name based on the content of some variables in the function and the time and date. How can this be done ...
24
votes
5answers
1k views

How can I wrap text around a circle?

How can I wrap text around a circle? For example: the text in the sectors of this chord plot. Perhaps one could use FilledCurve[] and then apply a ...
9
votes
1answer
848 views

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 ...
11
votes
2answers
229 views

Pasting “rectangles” of text side-by-side

In Emacs/Xemacs, there is a rectangle feature, such that you can delete, copy, etc., "rectangles" of text. Now suppose I have two text files, each containing one column of numbers. Is it possible to ...
19
votes
2answers
2k views

How to import all files of a folder at once?

I know how to import one textfile by calling its name filestring = Import["myfile.tex", "Text"]; Then "filestring" is a string with the myfile content. How do ...
20
votes
3answers
1k views

“Covering up” text in Graphics

Consider the following code: ...
6
votes
1answer
287 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): ...
13
votes
2answers
911 views

Computing the bounding boxes for Text objects

Regardless of AspectRatio, the Text boxes overlap. ...
17
votes
4answers
741 views

How to determine the convex hull of some text?

How can I get the co-ordinates of the convex hull of a piece of Text?
2
votes
1answer
161 views

Issues with a Counter that is tallying term appearances

I am working with an array of textfiles, trying to see how frequent certain terms are. However, I am running into some difficulty with my running counts of bigram frequency. Here is a snippet of my ...
27
votes
3answers
717 views

Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?

Is there a way to copy and paste code snippets from SE to Mathematica if these snippets are interspersed with text? Like e.g. in Morphing Graphics, color and location in both the question and answer, ...
10
votes
4answers
4k views

subscripts in plot axis labels

Superscripts can be included in axis labels by the use of the caret symbol (e.g., Plot[x^2, {x, -1, 1}, AxesLabel -> {x, x^2}]). How does one include subscripts ...
15
votes
2answers
628 views

Lexicographic ordering of strings in Mathematica

I recently realized that Mathematica seems incapable of comparing strings in the "normal" expected lexicographic order. Indeed, for some simulations, I need to process text directly, without fiddling ...
12
votes
2answers
786 views

Keeping Text Size the Same Throughout Entire Notebook File

Is there a way in which when you choose to format the size of the font within your notebook, for a particular cell, when you go into another cell, the default size font (12pt) will not be ...
6
votes
2answers
389 views

Text[] using Graphics

...