medieval_latina 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dd902526791ea82b288d966db1bf6ac699ca6846256412aa60c9b685253e333
4
- data.tar.gz: 9abfa510fa6c2f3dbc21b4e90b0392addc45a932c244d39cc6434ca46a810639
3
+ metadata.gz: 16b43f057d59dde5ed50dab23aa1098ae6fc34fdc8194c232be6827882bdc452
4
+ data.tar.gz: 0d9be075e1e7634985ffc9750578ff355f17b0704da462ad1a9385cae8239755
5
5
  SHA512:
6
- metadata.gz: 60e4c5925a37ac2ccc8e08ffcefd35a0d61cb8e4b46c81d1298d703dc31791b3ff7d7aabf828533d3e82842d5867eb7cc5a4aaee4422d6de4fc75f733aa58566
7
- data.tar.gz: 5822082352ae540e0aa67b49ad2b20f3744502c36dcb7ec96d696fd76bd1469a31a0210901caddd76a21189abecf682a129a1a094e84c3c100e52a3e1166140a
6
+ metadata.gz: 684ff286bdc6379e4fecf3b14168ec967a0ac4d286c1199c9cfa1ff7b5a958037d51812890c721159fdfc86e00a5ddb9717891c105cabf7149781598066c8f07
7
+ data.tar.gz: bd3e5086934968a1eb8bf70b513cbfdd9721fd0155395648e005a9b46e45f8305909c484a871a09941b74ba775c0e6c3376097c280454286474d3d1c465e644f
@@ -0,0 +1,57 @@
1
+ name: Claude Code Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize]
6
+ # Optional: Only run on specific file changes
7
+ # paths:
8
+ # - "src/**/*.ts"
9
+ # - "src/**/*.tsx"
10
+ # - "src/**/*.js"
11
+ # - "src/**/*.jsx"
12
+
13
+ jobs:
14
+ claude-review:
15
+ # Optional: Filter by PR author
16
+ # if: |
17
+ # github.event.pull_request.user.login == 'external-contributor' ||
18
+ # github.event.pull_request.user.login == 'new-developer' ||
19
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
+
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+ pull-requests: read
25
+ issues: read
26
+ id-token: write
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 1
33
+
34
+ - name: Run Claude Code Review
35
+ id: claude-review
36
+ uses: anthropics/claude-code-action@v1
37
+ with:
38
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ prompt: |
40
+ REPO: ${{ github.repository }}
41
+ PR NUMBER: ${{ github.event.pull_request.number }}
42
+
43
+ Please review this pull request and provide feedback on:
44
+ - Code quality and best practices
45
+ - Potential bugs or issues
46
+ - Performance considerations
47
+ - Security concerns
48
+ - Test coverage
49
+
50
+ Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51
+
52
+ Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53
+
54
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55
+ # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options
56
+ claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57
+
@@ -0,0 +1,50 @@
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # Optional: Add claude_args to customize behavior and configuration
47
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
+ # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options
49
+ # claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)'
50
+
data/.tool-versions CHANGED
@@ -1 +1,2 @@
1
+ nodejs 24.2.0
1
2
  ruby 3.4.1
data/CLAUDE.md ADDED
@@ -0,0 +1,60 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Development Commands
6
+
7
+ - **Setup**: `bin/setup` - Install dependencies with bundle install
8
+ - **Tests**: `rake spec` or `bundle exec rspec` - Run the full test suite
9
+ - **Linting**: `bin/lint` - Run StandardRB linter and jsonlint on dictionary.json
10
+ - **Build lexicons**: `bin/build` - Regenerate PLS lexicon files from dictionary.json
11
+ - **Console**: `bin/console` - Interactive prompt for experimentation
12
+ - **Install gem locally**: `bundle exec rake install`
13
+ - **Release**: `bundle exec rake release` (after updating version.rb)
14
+
15
+ ## Architecture Overview
16
+
17
+ This is a Ruby gem that converts medieval Latin text to phonetic English for text-to-speech engines. The architecture consists of:
18
+
19
+ ### Core Components
20
+
21
+ - **MedievalLatina class** (`lib/medieval_latina.rb`): Main interface with class methods for text conversion and linguistic analysis
22
+ - `MedievalLatina[text]` - Primary conversion method
23
+ - Part-of-speech helpers: `verb?`, `noun?`, `adjective?`, `adverb?`
24
+ - `pronunciations_for(words)` - Extract IPA pronunciations for lexicon building
25
+
26
+ - **Dictionary system** (`data/dictionary.json`): Large JSON file containing Latin words with metadata including:
27
+ - IPA pronunciations
28
+ - Part of speech classifications
29
+ - Custom pronunciation overrides
30
+
31
+ - **Lexicon generation** (`lib/medieval_latina/lexicon_builder.rb`, `lib/medieval_latina/lexicon.rb`): Creates PLS (Pronunciation Lexicon Specification) files for AWS Polly and other TTS engines
32
+
33
+ ### Phonetic Conversion Logic
34
+
35
+ The main conversion algorithm handles:
36
+ - Vowel teams: ae→ay, oe→ay, au→ou
37
+ - Consonant transformations: c→ch/k (soft/hard), g→j/g, j→y, t→ts/t, x→ks
38
+ - Consonant teams: gn→n-y, qu→kw
39
+ - Text preprocessing with I18n transliteration
40
+
41
+ ### Data Flow
42
+
43
+ 1. Text input → word tokenization → dictionary lookup
44
+ 2. If word has custom pronunciation → use it
45
+ 3. Otherwise → apply phonetic transformation rules
46
+ 4. Rejoin with proper punctuation spacing
47
+
48
+ ## Key Files
49
+
50
+ - `lib/medieval_latina.rb` - Main conversion logic and API
51
+ - `data/dictionary.json` - Latin word database (400KB+)
52
+ - `bin/build` - Splits dictionary into multiple PLS files in lexicons/ directory
53
+ - `.standard.yml` - StandardRB configuration (Ruby 3.2, parallel linting)
54
+ - `medieval_latina.gemspec` - Gem specification (requires Ruby >= 3.2.0)
55
+
56
+ ## Testing
57
+
58
+ - RSpec test suite in `spec/`
59
+ - Configuration in `.rspec` with documentation format
60
+ - Run specific tests: `bundle exec rspec spec/specific_spec.rb`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- medieval_latina (3.1.0)
4
+ medieval_latina (3.1.2)
5
5
  i18n
6
6
 
7
7
  GEM
@@ -19,8 +19,8 @@ GEM
19
19
  optimist (~> 3)
20
20
  language_server-protocol (3.17.0.3)
21
21
  lint_roller (1.1.0)
22
- mini_portile2 (2.8.6)
23
- nokogiri (1.18.0)
22
+ mini_portile2 (2.8.9)
23
+ nokogiri (1.18.9)
24
24
  mini_portile2 (~> 2.8.2)
25
25
  racc (~> 1.4)
26
26
  oj (3.16.5)
@@ -32,11 +32,11 @@ GEM
32
32
  parser (3.3.4.2)
33
33
  ast (~> 2.4.1)
34
34
  racc
35
- racc (1.7.3)
35
+ racc (1.8.1)
36
36
  rainbow (3.1.1)
37
37
  rake (12.3.3)
38
38
  regexp_parser (2.9.2)
39
- rexml (3.3.9)
39
+ rexml (3.4.2)
40
40
  rspec (3.9.0)
41
41
  rspec-core (~> 3.9.0)
42
42
  rspec-expectations (~> 3.9.0)