wiktextract
glossterm
wiktextract | glossterm | |
---|---|---|
7 | 1 | |
704 | 4 | |
- | - | |
9.8 | 0.0 | |
8 days ago | over 1 year ago | |
Python | Go | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wiktextract
- Wiktionary dump file parser and multilingual data extractor
- How to Download All of Wikipedia onto a USB Flash Drive
-
I built a dictionary app even with more than and300 apps available at AppStore
Great work
I'm working on similar dictionary app and found wiktionary insanely usable as dictionary source.
Here is one more project aiming to make wiktionary data usable as json data structure: https://github.com/tatuylonen/wiktextract.
It has a link to a site https://kaikki.org/ which hosts dictionary data dumps.
-
Dynamically generating minimal pair decks for Anki
Hm, that would be a good idea... if I didn't have to download so much data (over 20GB for just audio?!). But, looking at the Python library that processed those dumps (https://github.com/tatuylonen/wiktextract), which is more manageable, using it would involve getting the WikiMedia dump file for every word on the list, then parsing them for the relevant data and what follows is mostly the same, except I end up with a bunch of cached files.
-
What are some of the best digital free dictionaries available online (even for commercial use)?
Many parsers are available. https://github.com/tatuylonen/wiktextract
-
Best Approach to importing a languages dictionary
I'd probably try pulling from Wiktionary, there looks to be a Python package that can do it here.
-
This is not perfect but it's a start
And the json is built with https://github.com/tatuylonen/wiktextract whom I have to thank
glossterm
-
I built a dictionary app even with more than and300 apps available at AppStore
I saw a few posts discuss using the Wiktionary dump directly vs. the freeDictionary API, which is difficult to do because the raw wiki text isn't immediately usable. I actually created and open sourced a project several years ago that I never publicized that lexes and parses the Wiktionary dump:
https://github.com/vthommeret/glossterm
Specifically it can understand and execute 21 different wiki text templates (e.g. "cog", "borrow", "gloss", "prefix", "qualifier”), e.g. {{inh|es|la|gelātus}}:
https://github.com/vthommeret/glossterm/tree/master/lib/tpl
And eventually parse it into this structure, which has a list of all definitions (distinguished into nouns, adjectives, verbs, adverbs, etc...), etymology, links, and descendants for a given word:
https://github.com/vthommeret/glossterm/blob/master/lib/gt/p...
Further parts of the pipeline turned different relationships into edges that I could stick into a graph database and do certain graph queries. This allowed me to do certain queries like find French, Spanish, and English words that share a Latin root.
I ended up parallelizing this specific query using Apache Beam and then dumping the results into Firestore so they could be queried via a web app. Here's an example for the Spanish word: helado
https://cognate.app/words/es/helado
Under the "Cognates" section, it knows that it comes from the Latin root "gelatus" from which English has borrowed the word "gelato".
I originally started this project when I was learning Spanish. If you just look up the definition of helado (ice cream) it doesn't necessarily help you learn it. But I found that if I could relate it to languages I already knew (e.g. English and French), it was easier to remember. In this case helado is related to gelato, but you won't find that in e.g. Google Translate or SpanishDict.
Ultimately, I found that while the Wiktionary data is amazing, it’s also a bit of a quagmire for finding cognates. I would miss certain etymologies where you had to follow a descendant tree 2 or 3 levels deep. Or a definition would just mention a word it was related to. But if I expanded the query to include these instances, then it significantly increased the amount of non-cognates that showed up in the results.
So I created a useful set of tools (which I never wrote about until now), but I realized the end result of a web UI that showed the relationships between words would require a significant investment in data quality that likely wasn’t possible without changing Wiktionary itself / community investment.
What are some alternatives?
WiktionaryParser - A Python Wiktionary Parser
Kotoba - Quickly search the built-in iOS dictionary to see definitions of words. Collect words you want to remember.
Maat - Validation and transformation library powered by deductive ascending parser. Made to be extended for any kind of project.
organice - An implementation of Org mode without the dependency of Emacs - built for mobile and desktop browsers
trankit - Trankit is a Light-Weight Transformer-based Python Toolkit for Multilingual Natural Language Processing
logseq - A local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base. Use it to organize your todo list, to write your journals, or to record your unique life.
laserembeddings - LASER multilingual sentence embeddings as a pip package
orgro - An Org Mode file viewer for iOS and Android
zim-tools - Various ZIM command line tools
wordnote - A simple and elegant notebook to write new words and discover their meanings and synonyms https://wordnote.app
browsertrix-crawler - Run a high-fidelity browser-based crawler in a single Docker container