Live data from Hacker News

Using aligned word vectors for instant translations with Python and Rust

instantdomainsearch.com

21–30 of 38 posts

Re: Using aligned word vectors for instant translations with Python and Rust

#21
post #16
post #9

Earlier quoted context omitted.

> That said, is there something wrong with the translations offered? I think in French hello = "bonjour" and hi = "salut"... not sure where "bonjours" and "salutations" came from.

"Bonjours" doesn't exist, and "salutations" is a tad quirky, but OK in informal settings, especially when addressing many people at once.

No, bonjours exists (it's simply the plural form of bonjour used as a noun) but the contexts it is used are very very infrequent so it's weird to find it in that list.

Re: Using aligned word vectors for instant translations with Python and Rust

#22
post #19
post #3

We've released the underlying Rust implementation here: https://github.com/InstantDomain/instant-distance with Python bindings at https://pypi.org/project/instant-distance — feedback welcome!

For Linux, in the Makefile change the copy command to cp target/release/libinstant_distance.so instant-distance-py/test/instant_distance.so and it works. Built and running. The main tree was MacOS only. Here's resource consumption in a sample run. Time: 4.49s, Memory: 1552 mb. Single word. Three langs including en.

How did you figure this out? I've done lots of Linux software build troubleshooting as a result of using Gentoo, BuildRoot, and pacaur, but this doesn't ring any bells for a common issue

Re: Using aligned word vectors for instant translations with Python and Rust

#23
post #16

Earlier quoted context omitted.

"Bonjours" doesn't exist, and "salutations" is a tad quirky, but OK in informal settings, especially when addressing many people at once.

No, bonjours exists (it's simply the plural form of bonjour used as a noun) but the contexts it is used are very very infrequent so it's weird to find it in that list.

Compare "I said my hellos and goodbyes." in English. It's definitely a word, just so uncommon as to be largely irrelevant in most practical contexts.

Re: Using aligned word vectors for instant translations with Python and Rust

#24
Can something like this be done to compare/translate subsequences COVID genetic code to SARS and other virus genetic codes. Would be interesting how much overlap there is. And would further the research into where it came from.

Full genome of COVID-19 is available:

https://www.snapgene.com/resources/coronavirus-resources/?re...

Re: Using aligned word vectors for instant translations with Python and Rust

#25
post #10
post #3

We've released the underlying Rust implementation here: https://github.com/InstantDomain/instant-distance with Python bindings at https://pypi.org/project/instant-distance — feedback welcome!

I’ve not much to say on the actual lib, it seems great! However, don’t feel compelled to put all your rust code into a single lib.rs. You can split your work into several files and use ‘pub use’ and ‘mod’ in lib.rs to re-export your functions & types into a public API of your choosing. cargo check and format time might also slightly improve!

Funny, I often say the opposite. Don't feel compelled to split up your lib.rs. It's really refreshing to see a nice, compact library in one or two files. Much easier to follow, especially over "type per file". Of course, there are limits, but for a small lib like this, I personally would keep it in a single, or maybe two files.

Re: Using aligned word vectors for instant translations with Python and Rust

#27
post #10
post #3

We've released the underlying Rust implementation here: https://github.com/InstantDomain/instant-distance with Python bindings at https://pypi.org/project/instant-distance — feedback welcome!

I’ve not much to say on the actual lib, it seems great! However, don’t feel compelled to put all your rust code into a single lib.rs. You can split your work into several files and use ‘pub use’ and ‘mod’ in lib.rs to re-export your functions & types into a public API of your choosing. cargo check and format time might also slightly improve!

I have a fair bit of experience writing Rust code and the current status is totally deliberate. I find module file sizes of about 400-800 lines of code optimal in terms of my ability to find things vs the unnecessary complexity of having to skip around files when changing something that touches an API boundary.

Re: Using aligned word vectors for instant translations with Python and Rust

#28

Can something like this be done to compare/translate subsequences COVID genetic code to SARS and other virus genetic codes. Would be interesting how much overlap there is. And would further the research into where it came from. Full genome of COVID-19 is available: https://www.snapgene.com/resources/coronavirus-resources/?re...

Bioinformaticists have been able to do that with traditional algorithms for years (dynamic programming gets you a long way to compute an edit distance for example).

It is probably the first thing that was done once the COVID-19 genome was made public. A quick googling gave me that summary of the results: https://www.news-medical.net/health/How-Does-the-SARS-Virus-...

Re: Using aligned word vectors for instant translations with Python and Rust

#29
post #9
post #8

Earlier quoted context omitted.

Google Translate is state of the art, so I’m not sure why that would be surprising. That said, is there something wrong with the translations offered?

> That said, is there something wrong with the translations offered? I think in French hello = "bonjour" and hi = "salut"... not sure where "bonjours" and "salutations" came from.

It seems to be a very domain specific solution, they are trying to present versions of words in customer requested domain names if already taken.

Like you type in “stargazer. com”, system sees it’s already registered, and returns a “sorry sir it’s taken” page, with similar words listed as “but maybe try these words: astronomer, observatory, telescope, shooting star...”.

So it’s not serious translation, more of an inexpensive quick dictionary search. I guess it’s okay for its intended purposes.

Re: Using aligned word vectors for instant translations with Python and Rust

#30
post #19

Earlier quoted context omitted.

For Linux, in the Makefile change the copy command to cp target/release/libinstant_distance.so instant-distance-py/test/instant_distance.so and it works. Built and running. The main tree was MacOS only. Here's resource consumption in a sample run. Time: 4.49s, Memory: 1552 mb. Single word. Three langs including en.

How did you figure this out? I've done lots of Linux software build troubleshooting as a result of using Gentoo, BuildRoot, and pacaur, but this doesn't ring any bells for a common issue

They probably tried it, it couldn't find a dynlib which is a Macos shared object file, opened the three line makefile, and then fixed it to copy a .so
Post reply on HN