Skip to content

Commit

Permalink
feat: Add Ancient Greek (#3063)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Mar 30, 2024
1 parent c0cfac7 commit 35bdf6c
Show file tree
Hide file tree
Showing 21 changed files with 827,030 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dictionaries/grc_GR/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Change Log

## 1.0.0

- Initial Release
691 changes: 691 additions & 0 deletions dictionaries/grc_GR/LICENSE

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions dictionaries/grc_GR/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# CSpell Ancient Greek Dictionary

Ancient Greek dictionary for cspell.

This is a pre-built dictionary for use with CSpell.

## Installation

Global Install and add to CSpell global settings.

```sh
npm install -g @cspell/dict-grc
cspell link add @cspell/dict-grc
```

## Uninstall from CSpell

```sh
cspell link remove @cspell/dict-grc
```

## Manual Installation

Manual installation is useful if you want to include this dictionary as part of your CI/CD lint process.

```
npm i @cspell/dict-grc
```

The `cspell-ext.json` file in this package should be added to the import section in your `cspell.json` file.

```javascript
{
//
"import": ["@cspell/dict-grc/cspell-ext.json"],
//
}
```

# Dictionary Development

See: [How to Create a New Dictionary](https://github.com/streetsidesoftware/cspell-dicts#how-to-create-a-new-dictionary)

## License

MIT

> Some packages may have other licenses included.
<!--- @@inject: ../../static/footer.md --->
4 changes: 4 additions & 0 deletions dictionaries/grc_GR/checksum.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
c46b1d69f31a9eb49546e3f4b6186077c53989e2 dict/grc.trie
b9f592bdd2cbc83e40947e3e3a74e06d8ede9f4c src/additional_words.txt
9744bacbee216625832e8e7b80e93381d5f7ed80 src/hunspell/grc_GR.aff
180bf73315c38cf211b0213562f7afdd1eeab530 src/hunspell/grc_GR.dic
44 changes: 44 additions & 0 deletions dictionaries/grc_GR/cspell-ext.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// cSpell Settings
{
"id": "grc",
"version": "0.2",
"name": "Ancient Greek",
"description": "Ancient Greek dictionary for cspell.",
"readonly": true,
// List of dictionary files to add to the global list of dictionaries
"dictionaryDefinitions": [
{
"name": "grc",
"path": "./dict/grc.trie",
"description": "Ancient Greek dictionary for cspell."
}
],
// Dictionaries to always be used.
// Generally left empty
"dictionaries": [],
// Language Rules to apply to matching files.
// Files are matched on `languageId` and `locale`
"languageSettings": [
{
// VSCode languageId. i.e. typescript, java, go, cpp, javascript, markdown, latex
// * will match against any file type.
"languageId": "*",
// Language locale. i.e. en-US, de-AT, or ru. * will match all locales.
// Multiple locales can be specified like: "en, en-US" to match both English and English US.
"locale": "grc,grc_GR,gr,el-GRC",
// By default the whole text of a file is included for spell checking
// Adding patterns to the "includeRegExpList" to only include matching patterns
"includeRegExpList": [],
// To exclude patterns, add them to "ignoreRegExpList"
"ignoreRegExpList": [],
// regex patterns than can be used with ignoreRegExpList or includeRegExpList
// Example: "pattern": [{ "name": "mdash", "pattern": "&mdash;" }]
// This could be included in "ignoreRegExpList": ["mdash"]
"patterns": [],
// List of dictionaries to enable by name in `dictionaryDefinitions`
"dictionaries": ["grc"],
// Dictionary definitions can also be supplied here. They are only used iff "languageId" and "locale" match.
"dictionaryDefinitions": []
}
]
}
13 changes: 13 additions & 0 deletions dictionaries/grc_GR/cspell-tools.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-tools/cspell-tools.config.schema.json

targets:
- name: 'grc'
sources:
- filename: 'src/hunspell/grc_GR.aff'
maxDepth: 2 # This is set to 1 to prevent initial builds from taking too long.
- src/additional_words.txt
format: 'trie3'
targetDirectory: './dict'
generateNonStrict: true
compress: false
checksumFile: true
12 changes: 12 additions & 0 deletions dictionaries/grc_GR/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "0.2",
"files": [
"**/*.{md,txt}"
],
"dictionaries": [
"grc"
],
"import": [
"./cspell-ext.json"
]
}
3 changes: 3 additions & 0 deletions dictionaries/grc_GR/dict/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dict Directory

NOTE: This directory contains generated content. Please edit [src](../src/README.md) files.
48,467 changes: 48,467 additions & 0 deletions dictionaries/grc_GR/dict/grc.trie

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions dictionaries/grc_GR/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "@cspell/dict-grc",
"version": "1.0.0",
"description": "Ancient Greek dictionary for cspell.",
"publishConfig": {
"access": "public"
},
"exports": {
".": "./cspell-ext.json",
"./cspell": "./cspell-ext.json",
"./cspell-ext.json": "./cspell-ext.json"
},
"scripts": {
"build": "cspell-tools-cli build",
"test": "npm run test:words && npm run test:samples",
"test:samples": "cspell samples",
"test:words": "hunspell-reader words -n 1000 -m 0 \"src/hunspell/grc_GR.aff\" | cspell -c ./cspell-ext.json \"--locale=grc\" \"--languageId=*\" stdin",
"prepublishOnly": "echo OK",
"prepare:dictionary": "echo OK"
},
"repository": {
"type": "git",
"url": "git+https://github.com/streetsidesoftware/cspell-dicts.git"
},
"keywords": [
"cspell",
"cspell-ext",
"grc",
"Ancient Greek",
"dictionary",
"spelling"
],
"author": "Street Side Software",
"contributors": [],
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/streetsidesoftware/cspell-dicts/issues"
},
"homepage": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/dictionaries/grc#readme",
"devDependencies": {},
"dependencies": {},
"files": [
"dict/grc.trie",
"cspell-ext.json",
"LICENSE",
"src/hunspell/LICENSE",
"*.js",
"*.d.ts"
]
}
35 changes: 35 additions & 0 deletions dictionaries/grc_GR/samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Ancient Greek Examples

From: [Ancient Greek - Wikipedia](https://en.wikipedia.org/wiki/Ancient_Greek)

The beginning of Homer's Iliad exemplifies the Archaic period of ancient Greek (see Homeric Greek for more details):

Μῆνιν ἄειδε, θεά, Πηληϊάδεω Ἀχιλῆος
οὐλομένην, ἣ μυρί' Ἀχαιοῖς ἄλγε' ἔθηκε,
πολλὰς δ' ἰφθίμους ψυχὰς Ἄϊδι προΐαψεν
ἡρώων, αὐτοὺς δὲ ἑλώρια τεῦχε κύνεσσιν
οἰωνοῖσί τε πᾶσι· Διὸς δ' ἐτελείετο βουλή·
ἐξ οὗ δὴ τὰ πρῶτα διαστήτην ἐρίσαντε
Ἀτρεΐδης τε ἄναξ ἀνδρῶν καὶ δῖος Ἀχιλλεύς.

The beginning of Apology by Plato exemplifies Attic Greek from the Classical period of ancient Greek:

Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι, πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων, οὐκ οἶδα· ἐγὼ δ' οὖν καὶ αὐτὸς ὑπ' αὐτῶν ὀλίγου ἐμαυτοῦ ἐπελαθόμην, οὕτω πιθανῶς ἔλεγον. Καίτοι ἀληθές γε ὡς ἔπος εἰπεῖν οὐδὲν εἰρήκασιν.
Using the IPA:

<!--- cspell:disable --->
[hóti men hyːmêːs | ɔ̂ː ándres atʰɛːnaî̯i̯oi | pepóntʰate | hypo tɔ̂ːn emɔ̂ːŋ katɛːɡórɔːn | oːk oî̯da ‖ éɡɔː dûːŋ kai̯ au̯tos | hyp au̯tɔ̂ːn olíɡoː emau̯tûː | epelatʰómɛːn | hǔːtɔː pitʰanɔ̂ːs éleɡon ‖ kaí̯toi̯ alɛːtʰéz ɡe | hɔːs épos eːpêːn | oːden eːrɛ̌ːkaːsin ‖]
<!--- cspell:enable --->


Transliterated into the Latin alphabet using a modern version of the Erasmian scheme:

<!--- cspell:disable --->
Hóti mèn hūmeîs, ô ándres Athēnaîoi, pepónthate hupò tôn emôn katēgórōn, ouk oîda: egṑ d' oûn kaì autòs hup' autōn olígou emautoû epelathómēn, hoútō pithanôs élegon. Kaítoi alēthés ge hōs épos eipeîn oudèn eirḗkāsin.
Translated into English:
<!--- cspell:enable --->

How you, men of Athens, are feeling under the power of my accusers, I do not know: actually, even I myself almost forgot who I was because of them, they spoke so persuasively. And yet, loosely speaking, nothing they have said is true.

<!--- cspell:ignore Erasmian --->
<!--- cspell:words Πηληϊάδεω μυρί προΐαψεν ἄλγε Ἀτρεΐδης Ἄϊδι --->
3 changes: 3 additions & 0 deletions dictionaries/grc_GR/samples/cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import:
- ../cspell-ext.json
language: en,gr
3 changes: 3 additions & 0 deletions dictionaries/grc_GR/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Source Directory

All source files used to generate the dictionary should be stored in this directory.
1 change: 1 addition & 0 deletions dictionaries/grc_GR/src/additional_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Add and additional Ancient Greek words below. One per line.
Loading

0 comments on commit 35bdf6c

Please sign in to comment.