B
B
Banan442019-09-24 07:33:54
Books
Banan44, 2019-09-24 07:33:54

A translator with a limited vocabulary?

For example, there is a dictionary with French words

$str = "Привет, друг!";
$dictionary = [
    "salut" => "привет",
    "ami" => "друг"
]

You need to translate the string into French, i.e. replace Russian words with French.
If it's not difficult, then tell me how you can add certain delivery rules and so on. For example, une, un are placed before a noun in unit number

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2018-05-13
@lrv

if your eyes allow better, take
an e-ink tablet, by definition, there is no smart

I
Igor Rodichev, 2018-06-02
@Bubunt

I ordered a Kindle Paperwhite from Amazon. Very satisfied. There is a touch screen, the screen backlight is also there. As for me, there are simply no analogues as such.

F
FanatPHP, 2019-09-24
@FanatPHP

A question from the series "aunty, let me have a drink, otherwise I want to eat so much that there is nowhere to spend the night."
There are no "simple" translators.
To describe the rule "une, un is put before a noun in the ed number" it is necessary to define
- that the word is a noun
- used in the singular
Do you still call your translator "simple"?

T
ThunderCat, 2019-09-24
@ThunderCat

If it's not difficult, then tell me how you can add certain delivery rules and so on. For example, une, un are placed before a noun in unit number
Alas, if it were not difficult and fit in the size of an answer on a toaster, then such libraries would already be very common. Unfortunately, there are no more or less sensible solutions in terms of translation, even from Google, although its translator can be considered a major achievement. I am generally silent about the quality of others. So it’s possible, but difficult, within the framework of a short answer it definitely won’t work.
In your case - if you really want to - determine the formal criteria for highlighting a noun in the singular, I suspect that, accordingly, the gender / declension / conjugation / etc will have a strong influence on the construction of the phrase. To formalize all this is a big and difficult task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question