How to retrieve Wiktionary word content?

前端 未结 9 1643
花落未央
花落未央 2020-11-28 18:27

How may Wiktionary\'s API be used to determine whether or not a word exists?

9条回答
  •  时光说笑
    2020-11-28 18:58

    If you are using Python, you can use WiktionaryParser by Suyash Behera.

    You can install it by

    sudo pip install wiktionaryparser
    

    Example usage:

    >>> from wiktionaryparser import WiktionaryParser
    >>> parser = WiktionaryParser()
    >>> word = parser.fetch('test')
    >>> another_word = parser.fetch('test', 'french')
    >>> parser.set_default_language('french')
    

提交回复
热议问题