How to remove extra space(s) in the beginning of a sentence?
Thread poster: Chunyi Chen

Chunyi Chen
United States
Local time: 15:24
English to Chinese
Aug 30, 2012

Hi! Does anyone know if there is a macro or an ahk script that will remove the extra space(s) at the start of each Chinese sentence in a Word file? I don't remember experiencing such a problem in MemoQ 5, but since I migrated to MemoQ 6, I found it doing a great job maintaining the formatting of the source text (no sarcasm intended). Unfortunately this does not work with my language pair. In character-based Chinese, you don't put a space between sentences. Trados does a good job in removing these extra spaces when it cleans up a document. Now that I don't use Trados to process my files anymore, is there a quick and easy way to remove these unnecessary spaces in Word? Any suggestions are very appreciated.

As additional info, these extra spaces are seen after a Chinese period or after a colon. They are "between" segments in MemoQ, so there is no way for me to identify and fix them in MemoQ.

Thank you.

Chun-yi


Direct link Reply with quote
 

David Wright  Identity Verified
Austria
Local time: 00:24
German to English
+ ...
search and replace Aug 30, 2012

Can you not simply replace ". " by "."?

Direct link Reply with quote
 

wrenda  Identity Verified
Sweden
Local time: 00:24
Member (2012)
English to Swedish
+ ...
Search and replace with special characters Aug 30, 2012

Hi!

If the extra space is after a paragraph:

Search for: ^p (paragraph char) and space.
Replace with: ^p.


You will also have the opportunity to choose them in the Search and Replace form.

I there is a period and spaces you want to replace, you can search and replace that too.


When searching and replacing like this, always do it on a copy and make sure the criteria are unique.


Greetings,

Ann

[Edited at 2012-08-30 16:05 GMT]

[Edited at 2012-08-30 16:05 GMT]


Direct link Reply with quote
 

Chunyi Chen
United States
Local time: 15:24
English to Chinese
TOPIC STARTER
Both suggestions didn't seem to work Aug 30, 2012

Hi David and Wrenda,

Thank you for your suggestions. I tried them on my file and they didn't seem to work. What I am trying to achieve is:
Changing XXXXXX。 YYYYY: ZZZ
to
XXXXXX。YYYYY:ZZZ

Thank you for your help.

Chun-yi


Direct link Reply with quote
 

István Hirsch  Identity Verified
Local time: 00:24
English to Hungarian
If it was English... Aug 31, 2012

In Word, I would go to Edit/Find and Replace, check „Wildcards” checkbox and

Find:
[_]{2,}

Replace with:
_

(here ’ _’ means a space, not underscore) to replace any sequence of more than one spaces with only one.
Perhaps your Word version syntax needs a semicolon after 2, not a comma.


Direct link Reply with quote
 

Chunyi Chen
United States
Local time: 15:24
English to Chinese
TOPIC STARTER
a simple solution Aug 31, 2012

Marton from Kilgray tried a simple way that uses find and replace in Word and it worked!

Find (type one space here)
Replace (leave blank)

I didn't know it could be so simple.

Thank you all for your help.

Chun-yi


Direct link Reply with quote
 


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


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

How to remove extra space(s) in the beginning of a sentence?

Advanced search






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 »
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 »



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