Issue with api/plod/bySlug
First there should be a strict option and this url https://api.got.show/api/plod/bySlug/Aegon_Targaryen_(son_of_Rhaegar) gives only one algorithm back but this https://api.got.show/api/plod/bySlug/Aegon_Targaryen gives also the other algorithm back
I guess this is to attribute to the group that implemented the gotarffplod. They reformatted the names which are returned from the call of that-plod-for-that-char, apparently. There are two solutions to this:
- @nicoladesocio @konstantinos-angelo @dan736923 @s-feng @AlexMoroz how much hassle would it be to make the name coincide with the input name? If that is actually the issue here
- @Adiolis I guess you take the object returned by the
.getPlodfunction ofgotarffplodwhich contains the name without parenthesis. Would it be possible to, when saving to the db, instead of using that name, using the original name passed to the function?
@yashha as a side note, there are some (few) cases in which there are predictions for one alg and not for the otherone, as well as some cases in which there are no predictions at all
Yes, the character names are reformatted. "Aegon Targaryen (son of Rhaegar)" originally --> "aegon targaryen son of rhaegar" in JSON files of group 7
As far as I can see, you used getAllCharPredictions() to get a map with these reformatted names: {'aegon targaryen son of rhaegar': 0.826, ...}
A simple solution is to use getPlod(name), which simply does this: return map[ name.toString().toLowerCase().replace(/['()]/g, '') ];
I think the way to tweak this is to override it before saving it to the db, @Adiolis ? @boriside @togiberlin @kordianbruck
Also I found out that the slugs are inconsistent: https://api.got.show/api/plod/bySlug/Rus "character": "Rus", "character": "rus",
Also this is not returning both plods :( https://api.got.show/api/plod/bySlug/Daella_Targaryen_(daughter_of_Maekar_I)