Top "Text-processing" questions

Mechanizing the creation or manipulation of electronic text.

Eliminate partially duplicate lines by column and keep the last one

I have a file that looks like this: 2011-03-21 name001 line1 2011-03-21 name002 line2 2011-03-21 name003 line3 2011…

bash awk sed text-processing
Text Summarization Evaluation - BLEU vs ROUGE

With the results of two different summary systems (sys1 and sys2) and the same reference summaries, I evaluated them with …

nlp text-processing rouge bleu
Determining frequency of an array in Python

I have a sample file filled with floating point numbers as follows: -0.02 3.04 3.04 3.02 3.02 3.06 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.04 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.02 3.06 3.02 3.04 3.02 3.04 3.02 3.02 3.06 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.04 3.04 3.02 3.04 3.02 3.02 3.06 3.04 3.02 3.06 3.02 3.04 -0.02 -0.02 -0.02 -0.02 -0.02 -0.02 -0.04 …

python transform fft text-processing
How can I delete all lines that do not begin with certain characters?

I need to figure out a regular expression to delete all lines that do not begin with either "+" or "-". …

regex vim sed text-processing replace
How to proceed with NLP task for recognizing intent and slots

I wanted to write a program for asking questions about weather. What are the algorithms and techniques I should start …

machine-learning nlp artificial-intelligence text-processing
Converting a \u escaped Unicode string to ASCII

After reading all about iconv and Encoding, I am still confused. I am scraping the source of a web page …

r unicode text-processing iconv unicode-string
How to compute the number of times word appeared in a file or in some range

Sometimes I want to see how many times a certain function is called in a file or a code block. …

vim vi text-processing
How to strip trailing whitespace in CMake variable?

We are trying to improve the makefiles produced by CMake. For Clang, GCC and ICC, we want to add -march=…

cmake text-processing uname
Perl or Python: Convert date from dd/mm/yyyy to yyyy-mm-dd

I have lots of dates in a column in a CSV file that I need to convert from dd/mm/…

python perl date text-processing
Measuring width of text (Python/PIL)

I'm using the following two methods to calculate a sample string's rendered width for a set font-type and size: font = …

python python-imaging-library text-processing pillow