Extract strings from .txt files
Thread poster: hzhang

hzhang
Local time: 22:55
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.


 

mónica alfonso  Identity Verified
Local time: 23:55
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]


 

Heinrich Pesch  Identity Verified
Finland
Local time: 05:55
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


 

Samuel Murray  Identity Verified
Netherlands
Local time: 04:55
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.


 

Hynek Palatin  Identity Verified
Czech Republic
Local time: 04:55
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.


 

volker_h
Local time: 12:55
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.


 

Samuel Murray  Identity Verified
Netherlands
Local time: 04:55
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.


 


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







SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running, helps experienced users make the most of the powerful features, ensures new

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



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