Reformatting(?) some text
Thread poster: Lincoln Hui

Lincoln Hui  Identity Verified
Hong Kong
Local time: 12:31
Member
Chinese to English
+ ...
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:
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]


 

Tony M
France
Local time: 05:31
Member
French to English
+ ...
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...

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?!


 

Lincoln Hui  Identity Verified
Hong Kong
Local time: 12:31
Member
Chinese to English
+ ...
TOPIC STARTER
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
United Kingdom
Local time: 04:31
Member (2014)
Japanese to English
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: 12:31
Member
Chinese to English
+ ...
TOPIC STARTER
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






Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »



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