Skip to content

Include alternate readings in /api/search/words result  #50

Description

@GKJCJG

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I often use Jotoba to supplement glossary information from others, for example to fill in pitch accent or for more detailed PoS data. This usually means making a request based on what I have, then trying to match that to some result in the response. I'm usually conservative in evaluating the quality of a match, because I don't want to accidentally add data from the wrong word just because they match in reading or the like. One obstacle to this is that the /api/search/words endpoint does not return the alt_readings field returned by the api/app/words endpoint. That means that if, for example, I search for よる but also know it can be written in kanji as 因る, it's difficult to match to the entry for 依る, because there is no authoritative source of alternative forms, although there is a field "information": "esp. 因る, 由る" provided under one of the senses; but since that field could (maybe?) contain any useful information, I'm not confident using it for matching.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Include the the same data included in the alt_readings in the /api/app/words API endpoint in the /api/search/words endpoint.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Alternatively, document the /api/app/words endpoint so that it is easier to use that.

Alterantively, I can perform two searches, one with the reading I'm certain of, and one with the kanji that is associated with the word but not as its primary citation form. This works fine, but I try to avoid making too many requests to respect infrastructure.

Additional context
Add any other context or screenshots about the feature request here.

From the /api/app/words endpoint (from the browser network traffic):

            {
                "sequence": 1168660,
                "is_common": true,
                "reading": "[依|よ]る",
                "alt_readings": [
                    "[因|よ]る",
                    "[拠|よ]る",
                    "[由|よ]る"
                ],
                "senses": [
                    {
                        "misc": "UsuallyWrittenInKana",
                        "glosses": [
                            "to be due to",
                            "to be caused by"
                        ],
                        "information": "esp. 依る, 拠る",
                        "part_of_speech": [
                            {
                                "Verb": {
                                    "Godan": "Ru"
                                }
                            },
                            {
                                "Verb": "Intransitive"
                            }
                        ],
                        "language": "English",
                        "example_sentence": [
                            "[造|つく]られたもので、この[方|ほう]によらずできたものは[一|ひと]つもない。",
                            "Without him nothing was made that has been made."
                        ]
                    },
                    {
                        "misc": "UsuallyWrittenInKana",
                        "glosses": [
                            "to depend on",
                            "to turn on"
                        ],
                        "information": "esp. 依る",
                        "part_of_speech": [
                            {
                                "Verb": {
                                    "Godan": "Ru"
                                }
                            },
                            {
                                "Verb": "Intransitive"
                            }
                        ],
                        "language": "English",
                        "example_sentence": [
                            "この[理由|り|ゆう]により、[著者|ちょ|しゃ]に[関|かん]する[信憑性|しん|ぴょう|せい]は、[資料|し|りょう]の[信憑性|しん|ぴょう|せい]に[拠|よ]っているのである。",
                            "For this reason, the credibility of the book's authors rests on the credibility of their sources."
                        ]
                    },
                    {
                        "misc": "UsuallyWrittenInKana",
                        "glosses": [
                            "to be based on",
                            "to come from"
                        ],
                        "information": "esp. 因る, 由る",
                        "part_of_speech": [
                            {
                                "Verb": {
                                    "Godan": "Ru"
                                }
                            },
                            {
                                "Verb": "Intransitive"
                            }
                        ],
                        "language": "English"
                    },
                    {
                        "misc": "UsuallyWrittenInKana",
                        "glosses": [
                            "to be based at (a location, an organization)",
                            "to be headquartered at"
                        ],
                        "information": "esp. 拠る",
                        "part_of_speech": [
                            {
                                "Verb": {
                                    "Godan": "Ru"
                                }
                            },
                            {
                                "Verb": "Intransitive"
                            }
                        ],
                        "language": "English"
                    }
                ],
                "accents": [
                    {
                        "parts": [
                            {
                                "part": "",
                                "high": false
                            },
                            {
                                "part": "",
                                "high": true
                            }
                        ],
                        "pos": []
                    }
                ],
                "furigana": "[依|よ]る",
                "jlpt_lvl": 2,
                "sentences_available": 1,
                "kanji": [
                    {
                        "literal": "",
                        "stroke_count": 8,
                        "grade": 8,
                        "frequency": 906,
                        "jlpt": 2,
                        "onyomi": [
                            {
                                "reading": "",
                                "has_words": true
                            },
                            {
                                "reading": "",
                                "has_words": true
                            }
                        ],
                        "kunyomi": [
                            {
                                "reading": "よ.る",
                                "has_words": true
                            }
                        ],
                        "chinese": [
                            "yi1"
                        ],
                        "korean_romaji": [
                            "eui"
                        ],
                        "korean_hangul": [
                            ""
                        ],
                        "nanori": [
                            "",
                            "より"
                        ],
                        "similar_kanji": [
                            ""
                        ],
                        "meanings": [
                            "reliant",
                            "depend on",
                            "consequently",
                            "therefore",
                            "due to"
                        ],
                        "parts": [
                            "",
                            "",
                            ""
                        ],
                        "vietnamese": [
                            "Y",
                            ""
                        ],
                        "has_compounds": true,
                        "has_frames": true,
                        "has_animation": true,
                        "radical": {
                            "id": 9,
                            "literal": "",
                            "alternative": null,
                            "stroke_count": 0,
                            "readings": [],
                            "translations": [
                                "man"
                            ]
                        },
                        "is_kokuji": false
                    }
                ]
            },

From the /api/search/words endpoint:

    {
      "reading": {
        "kana": "よる",
        "kanji": "依る",
        "furigana": "[依|よ]る"
      },
      "common": true,
      "senses": [
        {
          "glosses": [
            "to be due to",
            "to be caused by"
          ],
          "pos": [
            {
              "Verb": {
                "Godan": "Ru"
              }
            },
            {
              "Verb": "Intransitive"
            }
          ],
          "language": "English",
          "information": "esp. 依る, 拠る",
          "misc": "UsuallyWrittenInKana"
        },
        {
          "glosses": [
            "to depend on",
            "to turn on"
          ],
          "pos": [
            {
              "Verb": {
                "Godan": "Ru"
              }
            },
            {
              "Verb": "Intransitive"
            }
          ],
          "language": "English",
          "information": "esp. 依る",
          "misc": "UsuallyWrittenInKana"
        },
        {
          "glosses": [
            "to be based on",
            "to come from"
          ],
          "pos": [
            {
              "Verb": {
                "Godan": "Ru"
              }
            },
            {
              "Verb": "Intransitive"
            }
          ],
          "language": "English",
          "information": "esp. 因る, 由る",
          "misc": "UsuallyWrittenInKana"
        },
        {
          "glosses": [
            "to be based at (a location, an organization)",
            "to be headquartered at"
          ],
          "pos": [
            {
              "Verb": {
                "Godan": "Ru"
              }
            },
            {
              "Verb": "Intransitive"
            }
          ],
          "language": "English",
          "information": "esp. 拠る",
          "misc": "UsuallyWrittenInKana"
        }
      ],
      "pitch": [
        {
          "part": "",
          "high": false
        },
        {
          "part": "",
          "high": true
        }
      ]
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions