Reformatting(?) some text
Téma indítója: Lincoln Hui
Lincoln Hui
Lincoln Hui  Identity Verified
Hongkong
Local time: 13:52
ProZ.com-tag
kínai - angol
+ ...
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
Tony M
Franciaország
Local time: 07:52
ProZ.com-tag
francia - angol
+ ...
A WEBOLDALAT LOKALIZÁLÓ FORDÍTÓ
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
Lincoln Hui  Identity Verified
Hongkong
Local time: 13:52
ProZ.com-tag
kínai - angol
+ ...
TÉMAINDÍTÓ
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
Dan Lucas  Identity Verified
Egyesült Királyság
Local time: 06:52
Tag (2014 óta)
japán - angol
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
Lincoln Hui  Identity Verified
Hongkong
Local time: 13:52
ProZ.com-tag
kínai - angol
+ ...
TÉMAINDÍTÓ
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:

A fórum moderátora(i)
Laureana Pavon[Call to this topic]

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

Reformatting(?) some text






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 »
Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »