Skip to main content

A library to fetch all the available nouns, adjectives or verbs from wiktionary, in different languages

Project description

Wiktionary Term Fetcher

This is the repository of a library to fetch all the available nouns, adjectives or verbs from either Wikidata or Wiktionary, in different languages.

  • When this library is used in Wikidata mode (default since version 0.2.0), the Wikidata SPARQL query endpoint is used to fetch

  • When this library is used in Wiktionary mode (deprecated since version 0.2.0), standard Wiktionary API is used. Some false positives (words which are not of the required type) can be included.

In both cases, the generated file uses UTF-8 encoding, and it stores each word in a single line.

Usage

The allowed parameters are these:

# wiktionary-fetcher --help
usage: wiktionary-fetcher [-h] [--lang LANG] [--terms {nouns,verbs,adjectives}]
                   [--fetcher {wikidata,wiktionary}]
                   output

Wiktionary term fetcher

positional arguments:
  output                Output file. If the name is '-', standard output will
                        be used

optional arguments:
  -h, --help            show this help message and exit
  --lang LANG           Language to be queried from. In Wikidata mode, any
                        valid shortcut can be used. In Wiktionary mode,
                        shortcuts for some common languages (en, es, ca, de,
                        fr) are accepted. In this last mode, you can also use
                        any valid language name being used in English
                        Wiktionary (for instance, 'French' or 'Basque').
                        (default: en)
  --terms {nouns,verbs,adjectives}
                        Terms type to be queried from either Wikidata or
                        Wiktionary (default: nouns)
  --fetcher {wikidata,wiktionary}
                        Which fetcher should be used (default: wikidata)

Usual patterns are

wiktionary-fetcher --lang en --terms verbs english_verbs.txt
wiktionary-fetcher --lang Japanese --terms nouns japanese_nouns.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wiktionary_term_fetcher-0.2.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wiktionary_term_fetcher-0.2.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file wiktionary_term_fetcher-0.2.1.tar.gz.

File metadata

  • Download URL: wiktionary_term_fetcher-0.2.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for wiktionary_term_fetcher-0.2.1.tar.gz
Algorithm Hash digest
SHA256 46efaaedcf6c81a7a9f672aeda64e266daf56c567d850a5fa562becf1fef3709
MD5 7a7eac37a5d9b9c1b237604fb6173d1b
BLAKE2b-256 84b9444a25ba7e1590fb1f6b543b203cc37488562e1a1b1fe9d68acf4f13e11a

See more details on using hashes here.

File details

Details for the file wiktionary_term_fetcher-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wiktionary_term_fetcher-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc8f57ffa802d719c5901255a5f53b0306ea3cfd1eafcde492245abbc1c5ec09
MD5 9e42849986f4e0a71bc2f1b2c036027f
BLAKE2b-256 7837d0d70d4974c29d0e2595156429bc3576e3360fd3249e72caaca01927c69e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page