-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grammar rules: limits? #251
Comments
Yes, this looks possible and desirable. I could propose to add some (say |
Actually your first issue requires changing whole source phrase not Maybe it's possible to apply elision right in source phrase like below? BTW also French translation on Transifex looks unsynchronized with current |
I don't think it will be possible to apply elision directly in source phrases, at least not always, as it only applies before vowels and some words starting with a h. It would need a bit of regex to detect on which cases apply elision. |
OK, then we need for another bunch of rules to post-process whole final phrase content. Actually this is necessary also for Russian (#240) 😉 |
@yuryleb would it make sense to add the article ( We would have something like:
But then I don't know what to do with cases like:
If we don't restrict ourselves to fit the grammar JSON file model, we can consider @yuryleb 's solution to post-process the whole sentence. |
@benjamintd: you could detect such cases with case-insensitive regex on the
This takes into account removing useless capital first letters, which in French are to be used only for start of sentences and proper names, and therefore are currently a disturbance when reading OSRM instructions: Tourner à droite sur la Rue de Jarménil is mostly an error, as the correct sentence would be Tourner à droite sur la rue de Jarménil. |
@benjamintd, actually it's the great idea just to "move" prepending article into I already prototyped and published first dummy implementation of French "grammar", just give me some time to change it accordantly to your proposals. |
@Penegal, @benjamintd, please review my second commit in #252, especially the proposed status street names list (I collect them early for translation for my Garmin Russian TTS voices project). I had to add new And actually I didn't yet test routes with |
@yuryleb: maybe we should wait for your PR to be merged before updating translations? |
Yes, since we started to change French translation strings too, it's better to finish the PR first. Fortunately Transifex seems to be able to upload translation JSON back (just don't forget to remove |
@yuryleb: you can try on these interchange:
I worked on them this morning, so, if map.project-osrm.org uses the OSM.org DB, you should be able to test on them. BTW, I saw cases where the lane assist wasn't working though the |
It seems |
Hello, there.
Making some tests with OSRM in French, I noticed it had no support of elision, which is particularly perceptible in this language: OSRM will, for instance, say Tourner légèrement à droite en direction de Épinal, whereas the correct French would be Tourner légèrement à droite en direction d’Épinal. That would need adaptation of translated text according to rules applied on the OSM names, but would this be possible using grammar rules?
Another related question: in some cases, OSRM will say, for instance, Tourner à gauche sur Rue de Jarménil (D 159b), but the correct French sentence would be Tourner à gauche sur la rue de Jarménil (D 159b), with a definite article, as the way name doesn't have one, and a lower case first letter. That would greatly increase readability and user-friendliness of instructions, but would it be possible and desirable?
I'm willing to help for these, at least for the regex part, as it is my first time on this project and I'm unsure I'm able to completely write such a feature from scratch.
Regards.
The text was updated successfully, but these errors were encountered: