How to use the duden.display.display_grammar function in duden

To help you get started, we’ve selected a few duden examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github radomirbosak / duden / duden / cli.py View on Github external
print(part)
    elif args.meaning_overview:
        if word.meaning_overview:
            print_tree_of_strings(word.meaning_overview)
    elif args.synonyms:
        synonyms = word.synonyms
        if synonyms:
            print_string_or_list(synonyms)
    elif args.origin:
        if word.origin:
            print(word.origin)
    elif args.compounds:
        if word.compounds:
            display_compounds(word, args.compounds)
    elif args.grammar:
        display_grammar(word, args.grammar)
    elif args.export:
        yaml_string = yaml.dump(word.export(),
                                sort_keys=False, allow_unicode=True)
        print(yaml_string, end='')
    elif args.words_before:
        print_string_or_list(word.words_before)
    elif args.words_after:
        print_string_or_list(word.words_after)
    else:
        # print the description
        describe_word(word)