Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vowel and taam props #166

Merged
merged 51 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6882681
Refactor char map typeguard
charlesLoder Apr 12, 2024
d795367
Refactor vowel prop on cluster
charlesLoder Apr 12, 2024
2b40d21
Refactor has vowel name method on cluster
charlesLoder Apr 12, 2024
c0e2c97
Fix typo
charlesLoder Apr 13, 2024
fb8afd7
Add meteg regex
charlesLoder Apr 13, 2024
54a7c29
Reorder cluster props
charlesLoder Apr 13, 2024
a6d2ce9
Convert to arrow func fixing lint error
charlesLoder Apr 13, 2024
cb3de9f
Refactor meteg in cluster
charlesLoder Apr 13, 2024
f15faa3
Organize imports
charlesLoder Apr 13, 2024
1bab986
Add meteg to char
charlesLoder Apr 13, 2024
973da5d
Change var names for no shadow
charlesLoder Apr 13, 2024
3ca9549
Refactor syl char map types
charlesLoder Apr 13, 2024
53c22cf
Reorder syllable props
charlesLoder Apr 13, 2024
dba0084
Refactor syllable text
charlesLoder Apr 13, 2024
6c948d2
Add helper function for map
charlesLoder Apr 14, 2024
00e66b5
Refactor out for different categories
charlesLoder Apr 15, 2024
f4749d9
Remove unused code
charlesLoder Apr 15, 2024
333dc35
Add tests for consonant properties
charlesLoder Apr 15, 2024
64f1c35
Add cluster props
charlesLoder Apr 15, 2024
5db8462
Fix typos
charlesLoder Apr 17, 2024
df936d1
Update tests
charlesLoder Apr 17, 2024
4f98b42
Update return types for arrays
charlesLoder Apr 17, 2024
8b9a140
Add tests for syllables
charlesLoder Apr 19, 2024
3bfdda3
Adds logic for syllables
charlesLoder Apr 19, 2024
97a8d5e
Update syllable documentation
charlesLoder Apr 19, 2024
01d5010
Remove log statement
charlesLoder Apr 19, 2024
c523faf
Overhaul cluster docs
charlesLoder Apr 20, 2024
9139ede
Reorder word props
charlesLoder Apr 20, 2024
3b455a1
Update word documentation
charlesLoder Apr 20, 2024
83c3317
Add taamim test for syllable
charlesLoder Apr 20, 2024
e63e934
Add taamim logic for syllable
charlesLoder Apr 20, 2024
53b6876
Order word tests
charlesLoder Apr 22, 2024
8d5b252
Add vowel tests to word
charlesLoder Apr 22, 2024
8047556
Add logic for vowels to words
charlesLoder Apr 22, 2024
ad89196
Add test for taamim
charlesLoder Apr 22, 2024
68a38d0
Add taamim logic
charlesLoder Apr 22, 2024
c9c64a3
Fix typo
charlesLoder Apr 22, 2024
1a36b12
Add taamimNames for syllable
charlesLoder Apr 22, 2024
12189dd
Add tammimNames logic for syllable
charlesLoder Apr 22, 2024
2029b59
Refator cluster props
charlesLoder Apr 22, 2024
44dca20
Update how shureq is handled
charlesLoder Apr 22, 2024
6c24ce9
Update types
charlesLoder Apr 22, 2024
72dc13f
Update syllable with caching
charlesLoder Apr 22, 2024
c9a626c
Remove unused types
charlesLoder Apr 22, 2024
42e6bdd
Fix typo
charlesLoder Apr 23, 2024
372a71a
Add tests for taamim names
charlesLoder Apr 23, 2024
2b0ebf8
Add logic for taamim names
charlesLoder Apr 23, 2024
32fe796
Update to dot notation
charlesLoder Apr 23, 2024
a9d42cc
Put keys in ascensding order
charlesLoder Apr 23, 2024
d3f18fa
Add lint rule disable
charlesLoder Apr 23, 2024
8d64618
Update variable to stop no shadow error
charlesLoder Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/char.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Cluster } from "./cluster";
import { consonants, dagesh, ligatures, vowels, rafe, sheva, taamim } from "./utils/regularExpressions";
import { CharToNameMap, charToNameMap, NameToCharMap, nameToCharMap } from "./utils/charMap";
import { CharToNameMap, NameToCharMap, charToNameMap, isCharKeyOfCharToNameMap, nameToCharMap } from "./utils/charMap";
import { consonants, dagesh, ligatures, meteg, rafe, sheva, taamim, vowels } from "./utils/regularExpressions";

/**
* A Hebrew character and its positioning number for being sequenced correctly.
Expand Down Expand Up @@ -39,13 +39,14 @@ export class Char {
if (Char.taamim.test(char)) {
return 4;
}
if (Char.meteg.test(char)) {
return 4;
}
// i.e. any non-hebrew char
return 10;
}

private isCharKeyOfCharToNameMap(char: string): char is keyof CharToNameMap {
return char in charToNameMap;
}
private isCharKeyOfCharToNameMap = isCharKeyOfCharToNameMap;

private static get consonants() {
return consonants;
Expand All @@ -59,6 +60,10 @@ export class Char {
return ligatures;
}

private static get meteg() {
return meteg;
}

private static get rafe() {
return rafe;
}
Expand Down
Loading
Loading