Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Issue with api/plod/bySlug #142

Open
yashha opened this issue Apr 8, 2016 · 5 comments
Open

Issue with api/plod/bySlug #142

yashha opened this issue Apr 8, 2016 · 5 comments

Comments

@yashha
Copy link
Collaborator

yashha commented Apr 8, 2016

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

@sacdallago
Copy link
Contributor

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:

  1. @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
  2. @Adiolis I guess you take the object returned by the .getPlod function of gotarffplod which 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

@dan736923
Copy link
Collaborator

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, '') ];

@sacdallago
Copy link
Contributor

I think the way to tweak this is to override it before saving it to the db, @Adiolis ? @boriside @togiberlin @kordianbruck

@yashha
Copy link
Collaborator Author

yashha commented Apr 10, 2016

Also I found out that the slugs are inconsistent:
https://api.got.show/api/plod/bySlug/Rus
"character": "Rus",
"character": "rus",

@yashha
Copy link
Collaborator Author

yashha commented Apr 10, 2016

Also this is not returning both plods :(
https://api.got.show/api/plod/bySlug/Daella_Targaryen_(daughter_of_Maekar_I)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants