Skip to content
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

Name_Multilingual: Basque & Asturian languages #1285

Closed
Crashillo opened this issue Jun 22, 2021 · 24 comments
Closed

Name_Multilingual: Basque & Asturian languages #1285

Crashillo opened this issue Jun 22, 2021 · 24 comments

Comments

@Crashillo
Copy link
Contributor

Is it possible to append a new multilingual style for the spanish basque regions: Navarre and Basque country? Since that comment, I've seen some languages new here (Belgium, Kosovo, Morocco & Djibouti, if I'm right)

The two names validation throws multiple syntax errors in these regions, in spite of the name tag is right according the community. The validation should match with the multilingual names.

Default separator: /
Default languages: eu / es

@frodrigo
Copy link
Member

Yes it is possible.

A new multilingual setup should be added. It does not match any existing one.
https://github.com/osm-fr/osmose-backend/blob/master/plugins/Name_Multilingual.py

The language order is fixed eu then es ?

Is it for Euskadi as in https://www.openstreetmap.org/relation/349042 ?
https://github.com/osm-fr/osmose-backend/blob/master/osmose_config.py#L1510

@Crashillo
Copy link
Contributor Author

@Crashillo Crashillo changed the title Name_Multilingual: Basque language Name_Multilingual: Basque & Asturian languages Jun 23, 2021
@Crashillo
Copy link
Contributor Author

Crashillo commented Jun 23, 2021

In addition to basque, the asturian lang has a similar casuistry:

Asturias: https://www.openstreetmap.org/relation/6428094
Separator: /
Languages: es / ast
Config: es_comm("asturias", 349033, "ES-AS", proj=32629 language=["es", "ast"])

@frodrigo
Copy link
Member

Space around / should or not be present ? or it doesn't matter ?

When there is only one name in name tag, should be Basque or Castilian ?

If there is name:eu and name:es tags, name can have only one of these ?

@frodrigo
Copy link
Member

<tag k="name" v="CC San Andres GE" />
<tag k="name:es" v="Centro Cívico San Andrés" />
<tag k="name:eu" v="San Andres gizarte etxea" />
<tag action="modify" k="name:eu" v="CC San Andres GE" />
<tag action="modify" k="name:es" v="CC San Andres GE" />
<tag action="modify" k="name" v="San Andres gizarte etxea/Centro Cívico San Andrés" />
<tag k="name" v="Quintana" />
<tag k="name:es" v="Quintana" />
<tag k="name:eu" v="Kinta" />
<tag action="modify" k="name" v="Kinta/Quintana" />
<tag k="name" v="Barriobusto/Gorrebusto" />
<tag k="name:es" v="Barriobusto" />
<tag k="name:eu" v="Gorrebusto" />
<tag action="modify" k="name" v="Gorrebusto/Barriobusto" />
<tag k="name" v="Pipaón" />
<tag k="name:es" v="Pipaón" />
<tag k="name:eu" v="Pipaon" />
<tag action="modify" k="name" v="Pipaon/Pipaón" />
<tag k="name" v="Consierra de Árcena" />
<tag k="name:eu" v="Artzenako Mendizerra" />
<tag action="modify" k="name:eu" v="Consierra de Árcena" />
<tag action="modify" k="name:es" v="Consierra de Árcena" />
<tag action="modify" k="name" v="Artzenako Mendizerra" />
<tag action="modify" k="name" v="Artzenako Mendizerra/Consierra de Árcena" />
<tag k="name" v="Gorobel / Sálvada" />
<tag k="name:es" v="Sierra Sálvada" />
<tag k="name:eu" v="Gorobelgo mendilerroa" />
<tag action="modify" k="name:eu" v="Gorobel" />
<tag action="modify" k="name:es" v="Sálvada" />
<tag action="modify" k="name" v="Gorobelgo mendilerroa/Sierra Sálvada" />
<tag k="name" v="Vitoria-Gasteiz (Estación Bus/Bus Geltokia)" />
<tag action="modify" k="name:eu" v="Vitoria-Gasteiz (Estación Bus" />
<tag action="modify" k="name:es" v="Bus Geltokia)" />
<tag k="name" v="EG/TC-13 Zaballa → Vitoria-Gasteiz" />
<tag action="modify" k="name:eu" v="EG" />
<tag action="modify" k="name:es" v="TC-13 Zaballa → Vitoria-Gasteiz" />
<tag k="name" v="EG/TC-13 Zaballa" />
<tag action="modify" k="name:eu" v="EG" />
<tag action="modify" k="name:es" v="TC-13 Zaballa" />
<tag k="name" v="EG/TC-13 Vitoria-Gasteiz → Zaballa" />
<tag action="modify" k="name:eu" v="EG" />
<tag action="modify" k="name:es" v="TC-13 Vitoria-Gasteiz → Zaballa" />
<tag k="name" v="Jundiz" />
<tag k="name:es" v="Júndiz" />
<tag k="name:eu" v="Jundiz" />
<tag k="alt_name" v="Jundizko industrialdea; Polígono de Júndiz" />
<tag action="modify" k="name" v="Jundiz/Júndiz" />
<tag k="name" v="Zadorra Sistemako urtegiak KBE/ZEC Embalses del sistema del Zadorra" />
<tag k="name:es" v="ZEC Embalses del sistema del Zadorra" />
<tag k="name:eu" v="Zadorra sistemako urtegiak KBE" />
<tag k="official_name:es" v="Zona Especial de Conservación Embalses del sistema del Zadorra" />
<tag k="official_name:eu" v="Zadorra Sistemako urtegiak Kontserbazio Bereziko Eremua" />
<tag action="modify" k="name:eu" v="Zadorra Sistemako urtegiak KBE" />
<tag action="modify" k="name" v="Zadorra sistemako urtegiak KBE/ZEC Embalses del sistema del Zadorra" />

@Crashillo
Copy link
Contributor Author

Space around / should or not be present ? or it doesn't matter ?

It would be great to keep some format consistency, but I did some overpass queries and the results are pretty similar. I'd tend to keep the spaces around.

If there is name:eu and name:es tags, name can have only one of these ?

Let me explain, since this is a big matter of controversy:
Is osmose able to check the issues over an smaller area than the region itself? I say so because the order will vary depending on which subregion you are.

Euskadi:

Navarre:

When there is only one name in name tag, should be Basque or Castilian ?

It doesn't matter. Ignore the casuistry since the subregions I mentioned before have their own rules. For instance, the city of Bilbao should be Bilbo / Bilbao, however, and officially, the name is only Bilbao. Therefore, if there's only one name.... let it go.
Regarding this, it exists another exception: some names could be splitted by a dash sign with no spaces around, i.e. Vitoria-Gasteiz. This is official, so they shouldn't be checked.

To sum up: If the name tag has any slash, look for the language tags in order to display the issue, if it's possible, fulfilling the regions I exposed before.

Sorry all this mess, but as I said, it's quite controversial since not all municipalities speak basque.

@Crashillo
Copy link
Contributor Author

For asturian language, it's pretty much easier: if there's any slash on the name, just look for name:es / name:ast (spaces around). Fallbacks to spanish.

@frodrigo
Copy link
Member

Space around / should or not be present ? or it doesn't matter ?

It would be great to keep some format consistency, but I did some overpass queries and the results are pretty similar. I'd tend to keep the spaces around.

If there is name:eu and name:es tags, name can have only one of these ?

Let me explain, since this is a big matter of controversy:
Is osmose able to check the issues over an smaller area than the region itself? I say so because the order will vary depending on which subregion you are.

No. The area are defined in the configuration

https://github.com/osm-fr/osmose-backend/blob/master/osmose_config.py#L1494-L1515

Requered changes:

+es_comm("asturias", 349033, "ES-AS", proj=32629, language=["es", "ast"], **{'multilingual-style': 'sp_eu'})

language=["eu", "es"] is also required for Navarra ?

When there is only one name in name tag, should be Basque or Castilian ?

It doesn't matter. Ignore the casuistry since the subregions I mentioned before have their own rules. For instance, the city of Bilbao should be Bilbo / Bilbao, however, and officially, the name is only Bilbao. Therefore, if there's only one name.... let it go.
Regarding this, it exists another exception: some names could be splitted by a dash sign with no spaces around, i.e. Vitoria-Gasteiz. This is official, so they shouldn't be checked.

To sum up: If the name tag has any slash, look for the language tags in order to display the issue, if it's possible, fulfilling the regions I exposed before.

Sorry all this mess, but as I said, it's quite controversial since not all municipalities speak basque.

No worry, except Bruxelles, all other areas I see have complex rules.

What about : "Zeharkalea 26 (Kiroldegia/Polideportivo)", "Kurtzero (Geltokia/Estación)", how to split that ?

@Crashillo
Copy link
Contributor Author

Crashillo commented Jun 29, 2021

No. The area are defined in the configuration

Since you cannot divide this, I'd suggest to avoid checking the language order.

language=["eu", "es"] is also required for Navarra ?

Same behaviour as Basque country

**{'multilingual-style': 'sp_eu'}

Watch this out. Asturias speaks Asturian, it's different from basque. sp_eu should apply for Euskadi & Navarre. In Asturias, should be something like sp_ast

What about : "Zeharkalea 26 (Kiroldegia/Polideportivo)", "Kurtzero (Geltokia/Estación)", how to split that ?

These names are wrong. They're not about two names rule, they include the amenity type in the name... they should be a different osmose error 😄, when there's text (in a name) within parentheses... you bet something is wrong

@frodrigo
Copy link
Member

Please could you review the configuration about language values
frodrigo@fe2e962

I think I have implement all the rules. Could you overview the result, please :
Analyser_Sax-spain_euskadi.xml.zip

@Crashillo
Copy link
Contributor Author

Crashillo commented Jun 30, 2021

This error contains a name and a name:es. Therefore the fix should suggest:

  • Add a name:eu with the name
  • Modify the name in order to include name:eu / name:es

Same way if it was name and name:eu

<error class="50604" subclass="0">
<location lat="43.294141" lon="-2.3539311" />
<node id="27552539" lat="43.294141" lon="-2.3539311" version="10" user="Juan_Carlos_G_F-imports">
<tag k="ele" v="4" />
<tag k="name" v="Deba" />
<tag k="place" v="village" />
<tag k="source" v="Instituto Geográfico Nacional" />
<tag k="capital" v="8" />
<tag k="name:es" v="Deva" />
<tag k="ref:ine" v="20029000100" />
<tag k="wikidata" v="Q1611504" />
<tag k="population" v="5185" />
<tag k="source:ele" v="MDT5" />
<tag k="admin_level" v="8" />
<tag k="postal_code" v="20820" />
<tag k="source:date" v="2011-06" />
<tag k="source:file" v="http://centrodedescargas.cnig.es/CentroDescargas/equipamiento/BD_Municipios-Entidades.zip" />
<tag k="source:name" v="Nomenclátor Geográfico de Municipios y Entidades de Población" />
</node>
<fixes>
<fix>
<node id="27552539">
<tag action="modify" k="name:eu" v="Deba" />
</node>
</fix>
<fix>
<node id="27552539">
<tag action="modify" k="name:es" v="Deba" />
</node>
</fix>
<fix>
<node id="27552539">
<tag action="modify" k="name" v="Deva" />
</node>
</fix>
</fixes>
</error>

@Crashillo
Copy link
Contributor Author

In any case, I'd go along with this. I'll test it one in production, to see which tunings would be better

frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Jul 4, 2021
@frodrigo frodrigo added the ready label Jul 4, 2021
frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Jul 14, 2021
frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Jul 15, 2021
jocelynj added a commit that referenced this issue Jul 15, 2021
* frodrigo/master:
  Add main tag telecom in TagFix_MultipleTag #1300
  Allow highway=service + amenity=weighbridge in TagRemove_Incompatible #1298
  Allow amenity=school + anduse=education in TagRemove_Incompatible #1295
  Enable Name_Multilingual in Spain #1285
  Fix test Josm_deprecated_test
  Update JOSM MapCSS
  Add mod() to mapcss lib
  Simplify configuration of option multilingual_style
  Better language config for Spain
  Move Website protocol issue to level 3 #1115
  Support more units in Number #1283
@frodrigo
Copy link
Member

@frodrigo
Copy link
Member

@Crashillo
Copy link
Contributor Author

Hey, the suggestions are working great! 👍
But I see the "two names" error don't deal with them: http://osmose.openstreetmap.fr/en/issues/open?item=5030&source=&class=705&country=spain%2a

For instance, look at this village. Multilingual settings are ok, but it keeps displaying "two names" error

frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Aug 1, 2021
@frodrigo
Copy link
Member

frodrigo commented Aug 1, 2021

Ok.
Disabling multiple name plugin on this area in next deploy.

@frodrigo frodrigo closed this as completed Aug 1, 2021
jocelynj added a commit that referenced this issue Aug 1, 2021
* frodrigo/master:
  Disable Name_Multiple plugin in ES-NC, ES-PV, ES-AS #1285
@frodrigo
Copy link
Member

frodrigo commented Aug 12, 2021

Ok.
Disabling multiple name plugin on this area in next deploy.

Deployed.

Manuel clean up. Stats update tomorrow.

@Crashillo
Copy link
Contributor Author

Since the regions were splitted these errors have come back again http://osmose.openstreetmap.fr/en/map/#item=5030&zoom=10&lat=43.019&lon=-2.442&level=1

@frodrigo frodrigo reopened this Jun 15, 2022
@frodrigo
Copy link
Member

Since the regions were splitted these errors have come back again http://osmose.openstreetmap.fr/en/map/#item=5030&zoom=10&lat=43.019&lon=-2.442&level=1

Yes, we have to update the list

not_for = ["ES-NC", "ES-PV", "ES-AS"]

Please can you give the new list to exclude ?

https://github.com/osm-fr/osmose-backend/blob/master/osmose_config.py#L1509-L1580

@Crashillo
Copy link
Contributor Author

Mmmmmm, that not_for list was the previous one? If so, the new one will be: "ES-O", "ES-NA", "ES-BI", "ES-SS", "ES-VI"

frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Jun 17, 2022
frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Jun 18, 2022
jocelynj added a commit that referenced this issue Jun 28, 2022
* frodrigo/master:
  Update data source of analyser_merge_public_equipment_FR_lyon_toilets
  Update data source of analyser_merge_public_transport_FR_stan
  Update column name from datasource in analyser_merge_emergency_points_LU
  Update Spain subarea exclusion #1285
  Only in usage road in analyser_merge_road_ES
@frodrigo
Copy link
Member

Deployed. But manual clean up required.

@frodrigo
Copy link
Member

Manualy removed.
Wating to check after next update.

asturias 13635
comunidad_foral_de_navarra 14042
euskadi/vizcaya 427247
euskadi/guipuzcoa 427302
euskadi/alava 427192

DELETE FROM markers where item = '5030' and class='705' and source_id in (13635, 14042, 427247, 427302, 427192);
DELETE FROM markers_counts where item = '5030' and class='705' and source_id in (13635, 14042, 427247, 427302, 427192);
-- DELETE FROM class where item = '5030' and class='705' and source_id in (13635, 14042, 427247, 427302, 427192);

@frodrigo
Copy link
Member

Looks good.

@Crashillo
Copy link
Contributor Author

Crashillo commented Jul 26, 2023

I'm noticing an issue here that should't. The element has these tags:

name = Xichón / Gillón
name:ast = Xichón
name:es = Gillón 

I presume the issue comes up due to the order. Osmose expects name = Gillón / Xichón, but that's wrong. The official name is in Asturian, then Spanish. But the solution is not about reversing the order, since another places are named firstly in Spanish, then Asturian.

Either you duplicate the following condition to deal ["es", "ast"] and ["ast", "es"], or you can check just the presence of the tags, no matter the order.

https://github.com/frodrigo/osmose-backend/blob/16582a0245fb8a874044c55dcac47aab831515c4/plugins/Name_Multilingual.py#L72

Same case for Navarre, basque / spanish, or spanish / basque, both are right. Perhaps the same for Basque country

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants