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

learn more… | top users | synonyms

21
votes
3answers
1k views

“Covering up” text in Graphics

Consider the following code: ...
20
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 ...
27
votes
3answers
729 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, ...
21
votes
2answers
669 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: ...
13
votes
2answers
929 views

Computing the bounding boxes for Text objects

Regardless of AspectRatio, the Text boxes overlap. ...
12
votes
2answers
811 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 ...
3
votes
5answers
371 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 ...
10
votes
1answer
426 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 ...
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 ...
17
votes
4answers
747 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?
9
votes
2answers
328 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 ...
1
vote
3answers
154 views

How to import files with headers?

R has excellent header supports such as read.table with header options. I don't want to mess up with text-processing or stream-processing. I am looking for a similar tool as in R because it saves a ...
3
votes
2answers
1k 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 ...
2
votes
3answers
290 views

Outputting a fraction on one line with an oblique division sign

How can I make Mathematica output a fraction as x/2 as opposed to the x on top with a horizontal bar and ...
0
votes
1answer
109 views

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 ...
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
2answers
581 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 ...
6
votes
2answers
485 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: ...
10
votes
4answers
5k 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 ...
7
votes
3answers
571 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 ...
15
votes
2answers
655 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
461 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 ...
8
votes
5answers
324 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. ...
3
votes
2answers
785 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
139 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 ...
7
votes
2answers
260 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
2answers
467 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 ...
4
votes
2answers
177 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, ...