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

learn more… | top users | synonyms

28
votes
3answers
793 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, ...
25
votes
3answers
1k 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: ...
24
votes
5answers
2k 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 ...
23
votes
3answers
1k views

“Covering up” text in Graphics

Consider the following code: ...
21
votes
2answers
763 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: ...
21
votes
2answers
519 views

Can Mathematica determine part-of-speech for each word in a text?

I've found that WordData has a database of English words and their possible parts of speech. But some words are ambiguous, e.g. result can be a verb or a noun: ...
20
votes
2answers
4k 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 ...
17
votes
4answers
816 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?
16
votes
2answers
801 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 ...
15
votes
3answers
471 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 ...
14
votes
2answers
333 views

Parenthesize what I have highlighted

I want to highlight a piece of equation, click a button and have that part taken into parentheses.
14
votes
2answers
335 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 ...
13
votes
2answers
1k 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 ...
13
votes
2answers
1k views

Computing the bounding boxes for Text objects

Regardless of AspectRatio, the Text boxes overlap. ...
12
votes
6answers
1k 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 ...
12
votes
3answers
558 views

Apply an image as a texture to text

I have the following equation eq = Sum[x^2, {x, 0, 10}] and an image ...
11
votes
4answers
6k 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 ...
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 ...
11
votes
2answers
405 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: ...
11
votes
2answers
242 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 ...
11
votes
2answers
372 views

Dimensions of the results of Text[] within Graphics[]

Is there a way to get the dimensions that the results of a Text[] will occupy within a Graphics[]? Specifically, if I run ...
10
votes
2answers
755 views

How to position text labels automatically to not overlap other graphics elements?

I was plotting reciprocal frame projection using Locators for a point to be expressed in terms of both the original basis (also specified with ...
10
votes
1answer
567 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 ...
10
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.
9
votes
5answers
400 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. ...
9
votes
1answer
1k 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 ...
9
votes
2answers
216 views

Pasting monospaced text into Mathematica notebook destroys aligment

I drew the little ASCII-art electronics schema below in vim. When i try to paste it into a Mathematica notebook, with: A) A code cell B) A monospaced font (Courier New) Mathematica insists on ...
9
votes
1answer
319 views

How can I replace the Greek symbols in an expression with their plain text names?

Suppose I have an expression with Greek symbols in it. How would I convert that expression to another expression where the Greek symbols have been replaces with their names in plain text? I've ...
9
votes
2answers
181 views

Backslash commands in strings?

I discovered by playing around that Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]] produces the same result as ...
8
votes
3answers
2k views

Skip header lines on import

When importing a data file what are the comment symbols for Mathematica? That is, given a file like this blabla bulbul 1 2 6 54 7 ... .. what symbol do I have ...
8
votes
1answer
105 views
+100

Accessing figure style (oldstyle or lining) of TrueType fonts

Most professional fonts come with at least two figure styles: old style (or text) figures and lining figures. In plots and most other figures I prefer to use lining figures. This is no problem with ...
7
votes
2answers
316 views

Apply 2 Styles within Text[]

Please consider : ...
7
votes
2answers
529 views

Generate Random Text within a Rectangle

I would like to generate images such as the four below. That is: some text of different length fit within a Rectangle[] using ...
7
votes
3answers
308 views

Add text after label in a Manipulate graphic

I can add the value of a slider to the right of it using the Appearance-->Labelled option, but what if I want to add text after the automatic label. How can I do that? Normally I want to do this to ...
7
votes
2answers
363 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 ...
7
votes
4answers
220 views

Strange behaviour when line-wrapping text in a Pane

I noticed some strange behaviour of Pane. In the result from the following code, the line wrapping is not consistent: why do the first and last line contain four ...
7
votes
2answers
114 views

Export textanalysis to pdf

In the helpfile there is a nice axample of text analysis (example/LexicalAnalysis) ...
7
votes
3answers
214 views

Formatting an equation on a plot

I am trying to label a plot with an equation. The problem is that Mathematica formats things almost well but not exactly. The parenthesis are of the wrong size, and the powers are not high enough. ...
7
votes
1answer
162 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 ...
7
votes
2answers
282 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, ...
6
votes
4answers
295 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 ...
6
votes
2answers
842 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
514 views

Text[] using Graphics

...
6
votes
2answers
566 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
1answer
338 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
152 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
169 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
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 ...
5
votes
2answers
874 views

rotating 3d text

Is it possible to create a 3d rotating text like this: animation here. Here is my try so far: ...
5
votes
2answers
168 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 ...