emacs-powerthesaurus icon indicating copy to clipboard operation
emacs-powerthesaurus copied to clipboard

Show the rating of the results

Open msteinbeck opened this issue 3 years ago • 3 comments

Synonyms, antonyms, phrases etc. on powerthesaurus have a rating. It would be useful to show the rating of each result.

msteinbeck avatar Feb 08 '22 10:02 msteinbeck

The results displayed on powerthesaurus.org are sorted by default based on ratings, although from what I can see, these values are not publicly available. The current implementation of this package extracts results using the default sorting criteria and displays them in the minibuffer in that exact order. From what I gather, this is the closest to the functionality that you describe above. Are you suggesting to also enumerate the results in the minibuffer?

maxchaos avatar Feb 21 '22 10:02 maxchaos

That the entries are sorted according to their rating makes sense. However, the rating of an entry could be twice as good as the rating of the next entry. From the sorting we now which one is rated better but we don't know "how much" better is (well, one could argue that ratings aren't metrics, but... still).

msteinbeck avatar Feb 21 '22 12:02 msteinbeck

I agree with you that including ratings is useful and it's worth implementing as a feature. The problem here is that the webservice does not include ratings associated with each synonym, antonym, etc displayed on the results page of a query (at the very least, I do not see such values without logging in). Unless I am missing something here, then there is no way to access and extract these values from the results in order to include them along with the candidates during completion.

maxchaos avatar Feb 21 '22 13:02 maxchaos

JSON from the page does contain rating information:

  "Term:1236": {
    "__typename": "Term",
    "id": "1236",
    "name": "wonderful",
    "slug": "wonderful"
  },
  "Thesaurus:{\"id\":\"19260414\",\"_type\":\"COMMON\"}": {
    "__typename": "Thesaurus",
    "_type": "COMMON",
    "id": "19260414",
    "isPinned": null,
    "targetTerm": {
      "__ref": "Term:1236"
    },
    "relations": {
      "tags": [
        "amazing",
        "good"
      ],
      "parts_of_speech": [
        1
      ]
    },
    "rating": 219,
    "vote": null,
    "votes": {
      "up": 219,
      "down": 1,
      "votes": 220
    }
  }

you can see that it even has the number of upvotes and downvotes for each term.

SavchenkoValeriy avatar Mar 04 '23 15:03 SavchenkoValeriy