Extract strings from .txt files
Thread poster: hzhang

hzhang
Local time: 21:30
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: 22:30
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: 04:30
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: 03:30
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: 03:30
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: 11:30
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: 03:30
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







Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »



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