Mobile menu

Extract strings from .txt files
Thread poster: hzhang

hzhang
Local time: 18:52
English to Chinese
Feb 6, 2006

Does anyone know how to extract strings from .txt files? We have several documents long documents that have many strings.

Thanks for your help.


Direct link Reply with quote
 

mónica alfonso  Identity Verified
Local time: 19:52
English to Spanish
+ ...
With Word? Feb 6, 2006

I don't understand very clearly what you need to do but txt files can be copied (Select All, Copy, Paste) into a Word document and this would allow you to use many more funcionalities.
Hope this helps you...
Of course, you may just copy and paste just the strings you need.

[Edited at 2006-02-06 22:21]


Direct link Reply with quote
 

Heinrich Pesch  Identity Verified
Finland
Local time: 01:52
Member (2003)
Finnish to German
+ ...
I use UltraEdit with txt-files Feb 7, 2006

Many other texteditors would have the possibility to process the text.
Regards
Heinrich


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 00:52
Member (2006)
English to Afrikaans
+ ...
I do not understand the question Feb 7, 2006

hzhang wrote:
Does anyone know how to extract strings from .txt files? We have several documents long documents that have many strings.


I don't understand the question. TXT files are already as good as extracted, aren't they? Or... what "strings" are you talking about? You could also concatenate all the files into one long file and open it in your favourite CAT tool.


Direct link Reply with quote
 

Hynek Palatin  Identity Verified
Czech Republic
Local time: 00:52
Member (2003)
English to Czech
+ ...
Extract strings from .txt files Feb 7, 2006

Do you mean "how to extract translatable strings from a text file and separate it from non-translatable text"?

In that case, I would open the text file(s) in Word, apply a non-translatable style using a search and replace operation with regular expressions and translate with a CAT tool.

The answer can't be more specific without knowing the exact structure of the files.


Direct link Reply with quote
 
volker_h
Local time: 08:52
English to German
+ ...
here's how to do it Feb 8, 2006

hzhang wrote:

Does anyone know how to extract strings from .txt files? We have several documents long documents that have many strings.

Thanks for your help.


Well, if you have a Unix system you can do it at the commandline as follows:

cat Filename.txt | perl -pe 'print s/\b/\n/g' | sort | uniq > outfile.txt

This will give you a sorted list of all the words in your .txt file. On Windows you will have to install "cygwin" with perl to do this.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 00:52
Member (2006)
English to Afrikaans
+ ...
Timothy C Craven's ExtPhr32 for Windows Feb 8, 2006

volker_h wrote:
This will give you a sorted list of all the words in your .txt file.


Timothy C Craven's ExtPhr32 for Windows. Unfortunately changes everything to uppercase. Very fast, even on large files.


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:

Moderator(s) of this forum
Maria Castro[Call to this topic]

You can also contact site staff by submitting a support request »

Extract strings from .txt files

Advanced search


Translation news





WordFinder
The words you want Anywhere, Anytime

WordFinder is the market's fastest and easiest way of finding the right word, term, translation or synonym in one or more dictionaries. In our assortment you can choose among more than 120 dictionaries in 15 languages from leading publishers.

More info »
LSP.expert
You’re a freelance translator? LSP.expert helps you manage your daily translation jobs. It’s easy, fast and secure.

How about you start tracking translation jobs and sending invoices in minutes? You can also manage your clients and generate reports about your business activities. So you always keep a clear view on your planning, AND you get a free 30 day trial period!

More info »



All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs