Mobile menu

Extract strings from .txt files
Thread poster: hzhang

hzhang
Local time: 14:06
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: 16:06
Member (2004)
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: 21:06
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: 20:06
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: 20:06
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: 05:06
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: 20:06
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:


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

Extract strings from .txt files

Advanced search


Translation news





TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »
Across v6.3
Translation Toolkit and Sales Potential under One Roof

Apart from features that enable you to translate more efficiently, the new Across Translator Edition v6.3 comprises your crossMarket membership. The new online network for Across users assists you in exploring new sales potential and generating revenue.

More info »



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