Categories
Felix tips tools

Guest Post: Felix Rule Placement Tutorial

The following is a guest post by friend and Felix user Peter DeBiase. He originally wrote this as a tutorial for a friend, but it was so useful I got his permission to post it to the Felix blog. Thanks, Peter!

Ideas for Application of Felix’s New Rule-Based Placement Feature to Translation of WOSAs

-Peter Adriano DeBiase 2013/07/02

First Things First

Rule based placement is a relatively new feature in Felix, so you might not have it if you haven’t updated Felix in a while. The easiest way to check is to just go to the main memory window and select Tools. If there’s a Rule Manager… option, you’re good to go.

Launching the Rule Manager
Launching the Rule Manager

If not, it’s time for an update (Help > Check Updates…). I believe that as of the time of this writing (2013/07/01), the latest version of Felix is 1.7.1.3.

Rule Based Placement Time!

In the patent translation industry, one document that you might run across is the Written Opinion of the International Searching Authority (WOSA). The most important part of a WOSA (where most of the translation needs to be done) is Box V. 2., which generally starts with a list of citations of prior art documents such as the following:

文献1:JP6-119983A(松下電器産業株式会社)、1994.04.28、段落「0009」-「0011」(ファミリーなし)

文献2:日本国実用新案登録出願4-34240号(日本国実用新案登録出願公開5-89553号)の願書に添付された明細書及び図面の内容を記録したCD-ROM(セイレイ工業株式会社),1993.12.07、全文、 図1,2(ファミリーなし)

The highlighted locations in each citation are just crying out for use of rule-based placement. Let’s look at each individually.

Each citation starts with the document number. We can set up a rule in Felix that will take a segment of the form “文献X” and magically turn it into “Document X”.

Select Tools > Rule Manager… and then select Add under Enabled Rules to add a new rule. This will display an Edit Felix Rule window. Set it up as follows.

Edit Felix Rule
Edit Felix Rule

That scary looking (\d+) and \1 are two examples of a very powerful tool called regular expressions, which is essentially like search and replace on steroids (note that they really are backslashes – my computer thinks it’s Japanese).

Gentle intro to regex, starting with the Source Field: “\d” means “look for a number here” and the added “+” means “it can be any number of digits.” The enclosing parentheses around the \d+ tell the computer to remember whatever the \d+ expression matches. Finally, the “\1” in the Target field tells the computer to take the thing it remembered from the Source field and insert it at the location of the “\1”.

If you’re confused, don’t worry, so am I. Know in advance that regular expressions have a (perhaps rightfully deserved) reputation for being difficult. Let it go for now, or read section 5.3 Rule-based Placement in the Felix Manual. That page also includes a link to a very good tutorial on regular expressions that may be of use if you find yourself wanting to go deeper into the rabbit hole later.

Now let’s looks at the other case: the date of the form 1994.04.28. We can set up another rule in Felix to turn this into “28 April 1994”, which is the correct way to write dates in WOSA citations.

Edit Felix Rule - 2
Edit Felix Rule – 2

Notice that this time we have two (\d+) expressions in the Source field – the computer will remember two things that are numbers of arbitrary length. Again, we can tell the computer where to put those two things in the Target field with the \1 (the first thing) and the \2 (the second thing) expressions.

Now, you might be saying, “Wait a second! That will only work for April!” And you are correct. We will have to make 12 separate rules to handle each month of the year. If it helps, you can copy and paste from the table below to save a little time. It might also be possible to make one super-rule to…rule…all of these cases if you know how to use conditionals in regular expressions, but personally my regex-fu isn’t quite there yet.

 WOSA Date Rules for Felix

Rule

Source

Target

WOSA Dates – January

(\d+).01.(\d+)

\2 January \1

WOSA Dates – February

(\d+).02.(\d+)

\2 February \1

WOSA Dates – March

(\d+).03.(\d+)

\2 March \1

WOSA Dates – April

(\d+).04.(\d+)

\2 April \1

WOSA Dates – May

(\d+).05.(\d+)

\2 May \1

WOSA Dates – June

(\d+).06.(\d+)

\2 June \1

WOSA Dates – July

(\d+).07.(\d+)

\2 July \1

WOSA Dates – August

(\d+).08.(\d+)

\2 August \1

WOSA Dates – September

(\d+).09.(\d+)

\2 September \1

WOSA Dates – October

(\d+).10.(\d+)

\2 October \1

WOSA Dates – November

(\d+).11.(\d+)

\2 November \1

WOSA Dates – December

(\d+).12.(\d+)

\2 December \1

(Note: The rules file can be downloaded here.)

The Payoff

So now, when we’re translating the citations in a WOSA, we’ll get some extra hits in our glossary from our rules:

Rule Placement
Rule Placement

And when we move to the next citation segment, those hits will be automatically updated as appropriate:

Rule Placement
Rule Placement

And the people rejoiced and there was much good in the land.

Is This Really Worth the Trouble?

That depends on what you mean by “worth” and “trouble.” We did just automate like 26 keystrokes, which is pretty cool, and now you’ll never miskey a document number or date again when you’re translating WOSAs so you can save time when proofing your translation, which is also pretty cool. There’s plenty of room for more use of rule based placement in translation of WOSAs, but to be honest I’m just getting started with those too so these are just some early ideas.

You’ve now also been exposed to regular expressions and rule-based placement in Felix, so you can extend what you learned here to making even better rules that are more suited to your translation work, because hey, we’re all translating different stuff. Also, applications of regex start to tend showing up everywhere once you know about them – it’s kind of like learning a new word and then suddenly you start hearing it all the time.

Categories
Felix tips

Felix tip: save specific translations from a translation memory

Sometimes, you might want to save specific translations from your translation memory (TM) into a separate file. For example, you might want to deliver a translation memory for your latest job, but not have to manage separate TMs for every job.

Below is an example of how to save all your translations created after a certain date (here, 2012-04-15) to a separate file.

  1. From the Felix window, open the Search window (Control + F)
  2. Search for “created-after: 2012-04-15” (without the quotes)
  3. On the bottom of the page, click Save Search Results to File
    Select a file name

If you then want to delete the entries from your current TM, do the following:

  1.   On the bottom of the page, click Delete Search Results
    This removes them from the current TM
  2. Close the Search window, and save your TM.

You can use any search conditions to filter your translations. Click Search Help in the Search window for a list of available search conditions.

Categories
Felix tips

Felix Tip: Step-by-Step Instructions for Adding Excel Glossary

Felix lets you import a translation memory (TM) or glossary straight from Microsoft Excel. Some users were having trouble figuring out how to do this from the manual entry, so here are some step-by-step instructions.

Click the images for an enlarged view.

Open the glossary in Excel

Step 1: Open glossary in Excel
Step 1: Open glossary in Excel

Select the top-left cell (source term) of the glossary.

If you are using Excel 2007 or later, you should be on the Add-ins tab. I like to arrange Felix and Excel/Word as shown in the screenshot.

From the Felix menu, select Add Glossary

Step 2: From the Felix menu, select Add Glossary
Step 2: From the Felix menu, select Add Glossary

The glossary is added to Felix

Step 3: The glossary is added to Felix
Step 3: The glossary is added to Felix

The last pair to be added appears in the Glossary window.

Categories
Felix tips

Getting data into Felix

Translation data can come in a wide range of formats; this is especially true of glossaries. Felix supports a variety of translation-memory and glossary formats, and by using the Felix import features in Excel, you can get data in many different formats into Felix.

Below are some of the many file formats that you can get into Felix.

Translation Memory Formats

Format How to Open
FTM .ftm is the native Felix translation memory format. You can open it by selecting File >> Open from the Felix Memory window, or dragging and dropping the file into the Memory window.
Felix XML Felix translation memories are XML files. Felix TMs saved with the .ftm and .xml extensions have the same structure, and can be opened in the same way.
TMX Felix supports both the 1.1 and 1.4 TMX standards. To open a TMX memory, select File >> Open from the Felix Memory window, and set the file type to “TMX,” or drag and drop a TMX file into the Memory window.
Trados Text Trados memories can be exported as a special text format. You can also open these TMs in Felix.
To open a translation memory in Trados text format, select File >> Open from the Felix Memory window, and set the file type to “Trados Text,” or drag and drop a Trados text file into the Memory window.
CSV You can import translation memories in this format by going through MS Excel. Open the file in Excel, and if necessary, arrange the columns so that the translation column is the next column to the right from the source column. If there is a context column, make sure that is to the right of the translation column. Next, select the source cell of the top row, and from the Felix menu, select Add Memory. See the relevant section of the manual for details.
Tab-separated Text The process for importing translation memories in this format is the same as for CSV files, above
Other XML Any translation memory in a tabular/table format can be imported into Felix via Excel. The process for importing translation memories in this format is the same as for CSV files, above

Glossary Formats

Format How to Open
FGLOSS .fgloss is the native Felix glossary format. You can open it by selecting File >> Open from the Felix Glossary window, or dragging and dropping the file into the Glossary window.
Felix XML Felix glossaries are XML files. Felix glossaries saved with the .fgloss and .xml extensions have the same structure, and can be opened in the same way.
Multiterm Multiterm is a Trados text-based glossary format. Felix can open both versions 5.x and 6.x of Multiterm text files.
To open a Multiterm glossary, select File >> Open from the Felix Glossary window, and set the file type to “Multiterm,” or drag and drop a Multiterm file into the Glossary window.
Tabbed Text You can open glossaries in tabbed-text format in Felix. To do so, select File >> Open from the Felix Glossary window, and set the file type to “Tabbed Text.”
CSV You can import glossaries in this format by going through MS Excel. Open the file in Excel, and if necessary, arrange the columns so that the translation column is the next column to the right from the source column. If there is a context column, make sure that is to the right of the translation column. Next, select the source cell of the top row, and from the Felix menu, select Add Glossary. See the relevant section of the manual for details.
Other XML Any glossary in a tabular/table format can be imported into Felix via Excel. The process for importing translation memories in this format is the same as for CSV files, above

In addition to the formats listed above, any tabular/table-based file that can be opened in Excel can be imported into Felix. For example, you can download a glossary in HTML format from the Internet, open it in Excel, and from there import it into Felix.

If you have an existing translation and original, and want to create a translation memory from it, then I suggest using the free Align Assist tool.

If you have the need to import a file format that’s not supported now, please let me know in the comments, or from the contact page.

Categories
Felix tips

Felix tip: Use a macro to give Felix focus

The latest version of Felix (1.6.4) has an expanded COM API. One of the new things you can do with this API is control the size and focus of the memory and glossary windows.

As an example, here is a Word macro that will raise Felix to the top of your screen, while keeping the keyboard focus in Word. This is useful if you return to Word after an internet search, etc., and don’t want to go searching around for the Felix window.

Sub ActivateFelix()

    Dim felix As Object
    Set felix = CreateObject("Felix.App")
    felix.Visible = True
    Call felix.app2.MemoryWindow.Raise

End Sub

Now if you assign a keyboard shortcut for this (in Word 2010, it would be File >> Options >> Customize Ribbon >> “Customize” keyboard shortcuts button, then select Macros >> ActivateFelix >> “your keyboard shortcut”).

You could also create a “document changed” event handler, so that every time Word gets focus, Felix is raised to be visible. The code for this is a bit too involved for this blog post, but you can see the Microsoft documentation for how to write document event handlers.

In a future release of Felix, I plan on making functionality similar to this (also remembering the widow sizes and positions) available as a Felix option.

I’ll be updating the API documentation soon with all the new stuff, but for the meantime, here are the APIs for the memory and glossary windows:

App.App2.MemoryWindow:

  • Raise (method)
  • Left (int)
  • Top (int)
  • Width (int)
  • Height (int)

App.App2.GlossaryWindow:

  • Raise (method)
  • Left (int)
  • Top (int)
  • Width (int)
  • Height (int)
Categories
Felix tips tools

Using Analyze Assist with MS Office 2007/2008 format

The current version of Analyze Assist can’t recognize the new “.docx”/”.pptx”/”xlsx” file extensions in MS Office 2007/2010 by default. I will be adding these definitions in the next release of Analyze Assist, but in the meantime, you can configure Analyze Assist to recognize these file formats.

Analyze Assist uses something called “segmenters,” and you can add the “-x” extensions to the various segmenters to make Analyze Assist recognize them.

To do this, from the Tools menu, select Options. The following dialog appears.

Screen shot of the Options dialog in Analyze Assist

As shown in the screenshot above, add “;*.docx”, “;*.pptx”, and “;*.xlsx” to the respective fields, and click OK.

Analyze Assist will now recognize the “-x” formats.

Categories
Felix tips

Showing the memory/glossary name in search results

There was an interesting question on the Japanese-language Felix forum about displaying the glossary/memory name in the Felix search results (from the new search window).

Right now, you can view the memory/glossary name if you click on the “Details” link, but it’s not visible by default. I plan to make it visible in a near-future update, but in the meantime, you can modify the search-matches template to show this information in the current Felix version.

I’ve created modified versions of the English and Japanese-language versions of the templates, and made them available for download.

Download the English version

Download the Japanese Version

To install the template file, do the following.

On Windows 7/Vista:

  1. Download the appropriate file above.
  2. Open the file Explorer.
  3. In the address bar, enter the following:
    %LOCALAPPDATA%\Felix\html\en
    Change the “en” to “jp” for the Japanese version.
  4. Unzip the downloaded file, and place it in this folder.

The next time you do a search, the file name will appear in the results.

On Windows XP/2000:

  1. Download the appropriate file above.
  2. Open the file Explorer.
  3. In the address bar, enter the following:
    C:\Documents and Settings\UserName\Local Settings\Application Data\Felix\html\en\
    Change UserName to your actual user name.
    Change the “en” to “jp” for the Japanese version.
  4. Unzip the downloaded file, and place it in this folder.

For more details about what you can customize in the template files, see Customizing Felix Templates in the manual.

Categories
Felix tips

Browsing your TMs/glossaries in Felix

Until recently, there was no real way to browse through your TMs and glossaries in Felix. One technique was to save the TM/glossary as an Excel file, and view it from Excel, but that obviously isn’t really satisfactory.

With the new Search feature in Felix, however, you can browse, edit, and delete your TM/glossary entries right from Felix.

The trick is to enter a search condition that will match all your entries, and then browse the results. I prefer to set the search term “created-before:2050”, which means “Show me all entries created before the year 2050”. Unless you own a time machine, this should match all the entries in your TM/glossary.

See below for some screenshots illustrating how to do this.

Assuming you want to browse a glossary, in the Glossary window, click the Search toolbar button.

Search button in Glossary window
Search button in Glossary window

The Search window appears. In the search box, enter “created-before:2050”.

Enter parameter in search window
Enter parameter in search window

All results are retrieved, and displayed in page view.

The entire contents of the glossary are displayed in paged view
The entire contents of the glossary are displayed in paged view

You can browse through the results, edit entries, delete entries, and so on. Incidentally, for this demonstration I used the Felix glossary created from the EDICT Japanese-English glossary file.

Categories
Felix tips

Felix tip: If the Felix menus/toolbars don’t show up

If one of your MS Office programs (Word, Excel, or PowerPoint) crashes, the Felix menu and toolbar might not appear the next time you start that program. This could be because Office has disabled the Felix add-in.

To enable the add-in, do the following.

On Office 2000/XP/2003

  1. From the Help menu, select About Microsoft Office XXX (where XXX is Word, Excel, or PowerPoint).
  2. At the bottom of the dialog box, click Disabled Items.
  3. If Felix is on the list, enable it, and restart the program.

On Office 2007

  1. Click on the Office button (the round button in the upper left of the window).
    Microsoft Office button
  2. Click on Word/Excel/PowerPoint Options.
  3. In the left panel, click Add-ins.
  4. If Felix is in the list of disabled add-ins, then set the “Manage” list at the bottom of the window to “COM Add-ins”, and click Go. Select the “Felix Addin” checkbox, and click OK.

    If Felix isn’t on the list of disabled items, set the “Manage” list at the bottom to “Disabled Items”, and click Go. Enable “Felix Addin”, and click OK.

  5. Close the Options dialog, and restart Word/Excel/PowerPoint.

If the problem persists

If the problem persists, please consider sending me your Felix log files. To do this:

  1. From the Start menu, select All Programs >> Assistant Suite >> Felix >> Show Logs.
  2. Click the Send button.
  3. If you use Microsoft Outlook for email, it will ask you if you want to give permission for an external program to use email. Allow access, and then send the email with the log files attached.
Categories
Felix tips

Felix tip: Review mode

Often after you’ve translated a Word document using Felix, you’ll need to make changes to your translation. You might have noticed a mistake as you reviewed your translation, or your client may have sent back edits. Ideally, any changes you make to your translation should be reflected in your Felix TM.

That’s what Review mode is for. Review mode is just like ordinary translation mode, except that you look up translations instead of source segments; and when you register a segment, instead of adding a new translation unit (TU), the existing one is modified with your corrections.

To get to Review mode, click the “Switch mode” button on the toolbar.

Switch to review mode button

You can also select Switch to Review Mode from the menu.

Switch to review mode menu item

When you’re in review mode, the colors of the buttons are reversed, and an asterisk in brackets ([*]) is shown next to the Felix menu.

Review mode in Word

You look up sentences just like in translation mode (see the quick-start tutorial for a brief overview), but instead of source segments, you’re looking up translations already in your TM.

Lookup from review mode

Make any corrections to the translation, then correct your translation just like registering a translation in Translation mode. Any edits will be reflected in your TM.

Review mode is also a handy way to check your translation, because you can see the source and translation side by side in the Felix window as you go.

To switch back to translation mode, click the “Switch” button again.

Switch back to translation mode button