Skip to content

Parse templates in Wiktionary #88

@Nakilon

Description

@Nakilon

I wonder how do I use it to get the Wiktionary data. For example an Etymology section for "Russian".

Infoboxer.wiktionary.get("Russian").sections.first.sections("Etymology").text

=> "{der:en|ML.|-} (11th century) {m:la|Russiānus}, the adjective of {m:la|Russia}, a Latinization of the {der:en|orv|Русь}. Attested in English (both as a noun and as an adjective) from the 16th century.\n\n"

How do I replace those templates like {der:en|ML.|-} with their real meaning to get:

Medieval Latin (11th century) Russiānus, the adjective of Russia, a Latinization of the Old East Slavic Русь (Rusĭ). Attested in English (both as a noun and as an adjective) from the 16th century.

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