Reformatting(?) some text
Autor de la hebra: Lincoln Hui

Lincoln Hui  Identity Verified
Hong Kong
Local time: 16:50
Miembro
chino a inglés
+ ...
Feb 10, 2015

I'm trying to find a way to reformat text that looks like this:
a blah blah blah blah blah blah blah

into this:
a blah
a blah
a blah
a blah
a blah
a blah
a blah


This has to do with a couple of files that are needed for my input method as below. Basically, I'm trying to reformat file a as below:
See more
I'm trying to find a way to reformat text that looks like this:
a blah blah blah blah blah blah blah

into this:
a blah
a blah
a blah
a blah
a blah
a blah
a blah


This has to do with a couple of files that are needed for my input method as below. Basically, I'm trying to reformat file a as below:
https://drive.google.com/file/d/0B5IIMsUNTTAFUUpQNkpEcW93VmM/view?usp=sharing

so that it looks like file b as below (open in Wordpad/Notepad++):
https://drive.google.com/file/d/0B5IIMsUNTTAFVDJHSjVUakdoR3M/view?usp=sharing

Thanks.

[Edited at 2015-02-10 22:23 GMT]
Collapse


 

Tony M
Francia
Local time: 09:50
Miembro
francés a inglés
+ ...
LOCALIZADOR DEL SITIO
To start with... Feb 10, 2015

After your aai etc, is there a tab character? And are those simple spaces between the Chinese
characters?

If so, I'd start by replacing the tabs with some other unique character combination, and then the spaces with tabs, which would then let you convert the text to a table, with each Chinese character on a separate line, and the EN 'source text' in the first cell of each section of the first column.

I don't quite know where to go from there...

Unles
... See more
After your aai etc, is there a tab character? And are those simple spaces between the Chinese
characters?

If so, I'd start by replacing the tabs with some other unique character combination, and then the spaces with tabs, which would then let you convert the text to a table, with each Chinese character on a separate line, and the EN 'source text' in the first cell of each section of the first column.

I don't quite know where to go from there...

Unless you could do the opposite, and start by inserting 'source text TAB' to replace each space; but I think you might need a little macro or script to automate that.

Or copy the table across into Excel so you can use 'fill down' in some way? Is there a 'fill down until not empty' command?!
Collapse


 

Lincoln Hui  Identity Verified
Hong Kong
Local time: 16:50
Miembro
chino a inglés
+ ...
PERSONA QUE INICIÓ LA HEBRA
You're a life-saver Feb 10, 2015

Those were actually multiple simple spaces rather than tabs, but a few search and replace still got things done.

Now I've got things in a table and I can do the rest by hand by transposing rows to columns in Excel. Still a lot of work but it's at least feasible now!


 

Dan Lucas  Identity Verified
Reino Unido
Local time: 08:50
Miembro 2014
japonés a inglés
Try a different tool Feb 10, 2015

Lincoln Hui wrote:
Still a lot of work but it's at least feasible now!

Lincoln, don't do this manually. What you're trying to do is a common transform operation in data wrangling that goes by a number of names, but usually something like reshaping from "wide to long" or "wide to tall". Once you've got the data into Excel the rest should be easy. Tableau's Excel add-on for reshaping data is useful for this - download it here:
http://kb.tableau.com/articles/knowledgebase/addin-reshaping-data-excel

But if you google the phrases above you will find ways to do it without the add-in such as this:
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_26549515.html

and this:
http://blog.contextures.com/archives/2011/07/20/normalize-data-for-excel-pivot-table/

Dan


 

Lincoln Hui  Identity Verified
Hong Kong
Local time: 16:50
Miembro
chino a inglés
+ ...
PERSONA QUE INICIÓ LA HEBRA
Fantastic Feb 10, 2015

Thanks Tony and Dan - the pivot table's exactly what I needed.

This is what you get when you've never bothered to learn the finer points of MS Office.

[Edited at 2015-02-10 23:29 GMT]


 


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


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

Reformatting(?) some text

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 »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »



Forums
  • All of ProZ.com
  • Búsqueda de términos
  • Trabajos
  • Foros
  • Multiple search