librelist archives

« back to archive

QuickT - CAT-kit

QuickT - CAT-kit

From:
Sebastjan Hribar
Date:
2013-04-15 @ 07:18
Hi all,

I've been goofing around this weekend as I can't keep away from Ruby and 
Shoes anymore;) and I've come up with QuickT 
(https://github.com/sebastjan-hribar/QuickT).

It's a single string computer aided translation kit. I work in the 
translation and localization industry and most of the CAT-software 
nowadays doesn't support clipboard translation, i.e. to translate just a 
sentence or a paragraph without having to create entire project with all 
requirements and to upload documents in such software.

And, since we often need such a single string CAT-tool I tried to make 
one just for the fun of it.

So far it wasn't hard, but I need to implement fuzzy matching. That is, 
to compare the string I want to translate with the strings in the 
translation memory and have those returned that let's say match in 60% 
or more.

Does anyone have any suggestions what to use?  I am looking into:

http://johdax.net/post/ruby-string-similarity-measures/

http://stackoverflow.com/questions/7692090/ruby-how-does-one-test-for-similarity-between-two-blocks-of-text

Kind regards
love shoes!
seba

Re: [shoes] QuickT - CAT-kit

From:
Arne Brasseur
Date:
2013-04-15 @ 11:06
Have a look at the 'amatch' gem. I'm not too familiar with it but we use it
in our project where I work. It contains several utilities for "approximate
string matching".

gem install amatch

https://github.com/flori/amatch




On 15 April 2013 09:18, Sebastjan Hribar <sebastjan.hribar@gmail.com> wrote:

> Hi all,
>
> I've been goofing around this weekend as I can't keep away from Ruby and
> Shoes anymore;) and I've come up with QuickT
> (https://github.com/sebastjan-hribar/QuickT).
>
> It's a single string computer aided translation kit. I work in the
> translation and localization industry and most of the CAT-software
> nowadays doesn't support clipboard translation, i.e. to translate just a
> sentence or a paragraph without having to create entire project with all
> requirements and to upload documents in such software.
>
> And, since we often need such a single string CAT-tool I tried to make
> one just for the fun of it.
>
> So far it wasn't hard, but I need to implement fuzzy matching. That is,
> to compare the string I want to translate with the strings in the
> translation memory and have those returned that let's say match in 60%
> or more.
>
> Does anyone have any suggestions what to use?  I am looking into:
>
> http://johdax.net/post/ruby-string-similarity-measures/
>
> 
http://stackoverflow.com/questions/7692090/ruby-how-does-one-test-for-similarity-between-two-blocks-of-text
>
> Kind regards
> love shoes!
> seba
>

Re: [shoes] QuickT - CAT-kit

From:
Sebastjan Hribar
Date:
2013-04-15 @ 22:38
Hi,

Dne 15. 04. 2013 13:06, piše Arne Brasseur:
> Have a look at the 'amatch' gem. I'm not too familiar with it but we 
> use it in our project where I work. It contains several utilities for 
> "approximate string matching".
>
> gem install amatch
>
> https://github.com/flori/amatch
>
>
Thank you, I've tested it and I'll try the longest substring similar 
method and also converting the output into percentages.

----
I found a bug in the current version I can't fix.

It's the line 91. If the string is not in the database it should return 
"No match found" in the target edit box. However, the program crashes 
every time. I've also tried

if db[@source_text.text].source == false

but it crashes as well.

Any idea?

kind regards
love shoes!
seba

Re: [shoes] QuickT - CAT-kit

From:
ashbb
Date:
2013-04-16 @ 13:23
Hi Seba,

Try out the following.

@target_text.text = "No match found" unless db[@source_text.text]

Hope this helps,
ashbb

Re: [shoes] QuickT - CAT-kit

From:
Sebastjan Hribar
Date:
2013-04-16 @ 13:39
Oddly enough your code and my previous code both work if they are as a
separate button. They don't work inside the block for get translation
button.

Regards
Seba
Dne 16. apr. 2013 15:23 je "ashbb" <ashbbb@gmail.com> napisal/-a:

> Hi Seba,
>
> Try out the following.
>
> @target_text.text = "No match found" unless db[@source_text.text]
>
> Hope this helps,
> ashbb
>
>