an-array-of-galician-words

List of ~687,000 Galician words


Keywords
galician, galego, words, dictionary, array, language
Licenses
CNRI-Python-GPL-Compatible/SSPL-1.0/MPL-1.1
Install
npm install an-array-of-galician-words@1.0.0

Documentation

an-array-of-galician-words

🇬🇧 English · 🏴󠁥󠁳󠁧󠁡󠁿 Galego

NPM version

List of ~687,000 Galician words.

Derived from the LibreOffice Galician Hunspell dictionary (gl_ES), processed and filtered to include only clean alphabetic words using the Galician character set ([a-záàâãéêèíïóòôõúùûüçñ]).

Inspired by the architecture of an-array-of-english-words by Titus Wormer.

Install

npm install an-array-of-galician-words

Use

const words = require('an-array-of-galician-words')

console.log(words.length)     // ~687000
console.log(words.slice(0, 5))
// [ 'a', 'abáboro', 'abacá', 'abacéla', 'abade' ]

console.log(words.filter(w => w.startsWith('gal')))
// [ 'gala', 'galano', 'galego', ... ]

API

The default export is a string[] of Galician words.

TypeScript

Types are included:

import words = require('an-array-of-galician-words')

const filtered: string[] = words.filter(w => w.length === 5)

Dataset

  • Source: LibreOffice dictionaries — gl
  • License: GPL-2.0-or-later OR LGPL-2.1-or-later OR MPL-1.1
  • Filter: Only characters matching /^[a-záàâãéêèíïóòôõúùûüçñ]+$/

Build

To regenerate index.json from source:

node setup.js    # Download gl_ES.dic and gl_ES.aff
node expand.js   # Expand dictionary (memory-efficient, no external tools needed)
node build.js    # Clean, filter and generate index.json

Credits

License

(GPL-2.0-or-later OR LGPL-2.1-or-later OR MPL-1.1) © Pablo G. Guízar