1.1.0 • Published 1 year ago

wordreference v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

wordreference

A Node solution for retrieving wordreference translations

wordreference exports a singles function called defineWord which asynchronously returns a translation from wordreference.

Example

import { defineWord } from "wordreference";

const definition = await defineWord("fish", "English-French");

Example Output:

{
    "inputWord": "fish",
    "sections": [
        {
            "title": "Principales traductions",
            "translations": [
                {
                    "word": {
                        "word": "fish, plural: fish, fishes",
                        "pos": "n"
                    },
                    "definition": "aquatic animal",
                    "meanings": [
                        {
                            "word": "poisson",
                            "pos": "nm",
                            "sense": "animal"
                        }
                    ],
                    "examples": [
                        {
                            "phrase": "My son has a pet fish.",
                            "translations": [
                                "Mon fils a un poisson."
                            ]
                        }
                    ]
                },
                ...
            ]
        },
        {
            "title": "Traductions supplémentaires",
            "translations": [...]
        },
        {
            "title": "Verbes à particule",
            "translations": [...]
        },
        {
            "title": "Formes composées",
            "translations": [...]
        }
    ],
    "audioLinks": [
        "https://www.wordreference.com/audio/en/us/us/en034319.mp3",
        "https://www.wordreference.com/audio/en/uk/general/en034319.mp3",
        "https://www.wordreference.com/audio/en/uk/rp/en034319.mp3",
        "https://www.wordreference.com/audio/en/Irish/en034319.mp3",
        "https://www.wordreference.com/audio/en/scot/en034319.mp3",
        "https://www.wordreference.com/audio/en/us/south/en034319.mp3",
        "https://www.wordreference.com/audio/en/Jamaica/en034319.mp3"
    ]
}

Dependencies

1.1.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago