stride-align 0.6.0
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 +7 -0
- data/LICENSE +201 -0
- data/NOTICE +255 -0
- data/README.md +107 -0
- data/data/bmpm_data/gen_approx_any.txt +131 -0
- data/data/bmpm_data/gen_approx_arabic.txt +26 -0
- data/data/bmpm_data/gen_approx_common.txt +233 -0
- data/data/bmpm_data/gen_approx_cyrillic.txt +18 -0
- data/data/bmpm_data/gen_approx_czech.txt +18 -0
- data/data/bmpm_data/gen_approx_dutch.txt +18 -0
- data/data/bmpm_data/gen_approx_english.txt +47 -0
- data/data/bmpm_data/gen_approx_french.txt +25 -0
- data/data/bmpm_data/gen_approx_german.txt +73 -0
- data/data/bmpm_data/gen_approx_greek.txt +18 -0
- data/data/bmpm_data/gen_approx_greeklatin.txt +20 -0
- data/data/bmpm_data/gen_approx_hebrew.txt +18 -0
- data/data/bmpm_data/gen_approx_hungarian.txt +18 -0
- data/data/bmpm_data/gen_approx_italian.txt +18 -0
- data/data/bmpm_data/gen_approx_polish.txt +84 -0
- data/data/bmpm_data/gen_approx_portuguese.txt +18 -0
- data/data/bmpm_data/gen_approx_romanian.txt +18 -0
- data/data/bmpm_data/gen_approx_russian.txt +48 -0
- data/data/bmpm_data/gen_approx_spanish.txt +21 -0
- data/data/bmpm_data/gen_approx_turkish.txt +18 -0
- data/data/bmpm_data/gen_exact_any.txt +40 -0
- data/data/bmpm_data/gen_exact_approx_common.txt +79 -0
- data/data/bmpm_data/gen_exact_arabic.txt +18 -0
- data/data/bmpm_data/gen_exact_common.txt +32 -0
- data/data/bmpm_data/gen_exact_cyrillic.txt +18 -0
- data/data/bmpm_data/gen_exact_czech.txt +18 -0
- data/data/bmpm_data/gen_exact_dutch.txt +18 -0
- data/data/bmpm_data/gen_exact_english.txt +18 -0
- data/data/bmpm_data/gen_exact_french.txt +18 -0
- data/data/bmpm_data/gen_exact_german.txt +18 -0
- data/data/bmpm_data/gen_exact_greek.txt +18 -0
- data/data/bmpm_data/gen_exact_greeklatin.txt +18 -0
- data/data/bmpm_data/gen_exact_hebrew.txt +18 -0
- data/data/bmpm_data/gen_exact_hungarian.txt +18 -0
- data/data/bmpm_data/gen_exact_italian.txt +18 -0
- data/data/bmpm_data/gen_exact_polish.txt +23 -0
- data/data/bmpm_data/gen_exact_portuguese.txt +18 -0
- data/data/bmpm_data/gen_exact_romanian.txt +18 -0
- data/data/bmpm_data/gen_exact_russian.txt +19 -0
- data/data/bmpm_data/gen_exact_spanish.txt +19 -0
- data/data/bmpm_data/gen_exact_turkish.txt +18 -0
- data/data/bmpm_data/gen_hebrew_common.txt +113 -0
- data/data/bmpm_data/gen_lang.txt +295 -0
- data/data/bmpm_data/gen_languages.txt +36 -0
- data/data/bmpm_data/gen_rules_any.txt +367 -0
- data/data/bmpm_data/gen_rules_arabic.txt +76 -0
- data/data/bmpm_data/gen_rules_cyrillic.txt +99 -0
- data/data/bmpm_data/gen_rules_czech.txt +67 -0
- data/data/bmpm_data/gen_rules_dutch.txt +78 -0
- data/data/bmpm_data/gen_rules_english.txt +113 -0
- data/data/bmpm_data/gen_rules_french.txt +114 -0
- data/data/bmpm_data/gen_rules_german.txt +129 -0
- data/data/bmpm_data/gen_rules_greek.txt +97 -0
- data/data/bmpm_data/gen_rules_greeklatin.txt +118 -0
- data/data/bmpm_data/gen_rules_hebrew.txt +62 -0
- data/data/bmpm_data/gen_rules_hungarian.txt +83 -0
- data/data/bmpm_data/gen_rules_italian.txt +77 -0
- data/data/bmpm_data/gen_rules_polish.txt +185 -0
- data/data/bmpm_data/gen_rules_portuguese.txt +105 -0
- data/data/bmpm_data/gen_rules_romanian.txt +64 -0
- data/data/bmpm_data/gen_rules_russian.txt +142 -0
- data/data/bmpm_data/gen_rules_spanish.txt +85 -0
- data/data/bmpm_data/gen_rules_turkish.txt +50 -0
- data/data/keyboard_data/qwerty.npy +0 -0
- data/data/matrix_data/BLOSUM100 +31 -0
- data/data/matrix_data/BLOSUM30 +31 -0
- data/data/matrix_data/BLOSUM35 +31 -0
- data/data/matrix_data/BLOSUM40 +31 -0
- data/data/matrix_data/BLOSUM45 +25 -0
- data/data/matrix_data/BLOSUM50 +25 -0
- data/data/matrix_data/BLOSUM55 +31 -0
- data/data/matrix_data/BLOSUM60 +31 -0
- data/data/matrix_data/BLOSUM62 +25 -0
- data/data/matrix_data/BLOSUM65 +31 -0
- data/data/matrix_data/BLOSUM70 +31 -0
- data/data/matrix_data/BLOSUM75 +31 -0
- data/data/matrix_data/BLOSUM80 +25 -0
- data/data/matrix_data/BLOSUM85 +31 -0
- data/data/matrix_data/BLOSUM90 +25 -0
- data/data/matrix_data/NUC.4.4 +25 -0
- data/data/matrix_data/PAM10 +34 -0
- data/data/matrix_data/PAM100 +34 -0
- data/data/matrix_data/PAM110 +34 -0
- data/data/matrix_data/PAM120 +34 -0
- data/data/matrix_data/PAM130 +34 -0
- data/data/matrix_data/PAM140 +34 -0
- data/data/matrix_data/PAM150 +34 -0
- data/data/matrix_data/PAM160 +34 -0
- data/data/matrix_data/PAM170 +34 -0
- data/data/matrix_data/PAM180 +34 -0
- data/data/matrix_data/PAM190 +34 -0
- data/data/matrix_data/PAM20 +34 -0
- data/data/matrix_data/PAM200 +34 -0
- data/data/matrix_data/PAM210 +34 -0
- data/data/matrix_data/PAM220 +34 -0
- data/data/matrix_data/PAM230 +34 -0
- data/data/matrix_data/PAM240 +34 -0
- data/data/matrix_data/PAM250 +25 -0
- data/data/matrix_data/PAM260 +34 -0
- data/data/matrix_data/PAM270 +34 -0
- data/data/matrix_data/PAM280 +34 -0
- data/data/matrix_data/PAM290 +34 -0
- data/data/matrix_data/PAM30 +25 -0
- data/data/matrix_data/PAM300 +34 -0
- data/data/matrix_data/PAM310 +34 -0
- data/data/matrix_data/PAM320 +34 -0
- data/data/matrix_data/PAM330 +34 -0
- data/data/matrix_data/PAM340 +34 -0
- data/data/matrix_data/PAM350 +34 -0
- data/data/matrix_data/PAM360 +34 -0
- data/data/matrix_data/PAM370 +34 -0
- data/data/matrix_data/PAM380 +34 -0
- data/data/matrix_data/PAM390 +34 -0
- data/data/matrix_data/PAM40 +34 -0
- data/data/matrix_data/PAM400 +34 -0
- data/data/matrix_data/PAM410 +34 -0
- data/data/matrix_data/PAM420 +34 -0
- data/data/matrix_data/PAM430 +34 -0
- data/data/matrix_data/PAM440 +34 -0
- data/data/matrix_data/PAM450 +34 -0
- data/data/matrix_data/PAM460 +34 -0
- data/data/matrix_data/PAM470 +34 -0
- data/data/matrix_data/PAM480 +34 -0
- data/data/matrix_data/PAM490 +34 -0
- data/data/matrix_data/PAM50 +34 -0
- data/data/matrix_data/PAM500 +34 -0
- data/data/matrix_data/PAM60 +34 -0
- data/data/matrix_data/PAM70 +25 -0
- data/data/matrix_data/PAM80 +34 -0
- data/data/matrix_data/PAM90 +34 -0
- data/ext/stride_align/backend_avx2.cpp +2 -0
- data/ext/stride_align/backend_avx512bwvl.cpp +2 -0
- data/ext/stride_align/backend_generic.cpp +3 -0
- data/ext/stride_align/backend_impl.hpp +983 -0
- data/ext/stride_align/backend_lasx.cpp +2 -0
- data/ext/stride_align/backend_lsx.cpp +2 -0
- data/ext/stride_align/backend_neon.cpp +2 -0
- data/ext/stride_align/backend_rvv.cpp +2 -0
- data/ext/stride_align/backend_sse41.cpp +2 -0
- data/ext/stride_align/backend_sve.cpp +2 -0
- data/ext/stride_align/backend_sve2.cpp +2 -0
- data/ext/stride_align/backend_vsx.cpp +2 -0
- data/ext/stride_align/beider_morse_impl.cpp +5 -0
- data/ext/stride_align/cpu_detect.cpp +172 -0
- data/ext/stride_align/cpu_detect.hpp +6 -0
- data/ext/stride_align/extconf.rb +114 -0
- data/ext/stride_align/target_profile.hpp +82 -0
- data/ext/stride_align/vendor/beider_morse_impl.cpp +1467 -0
- data/ext/stride_align/vendor/stride_align/alignment.hpp +199 -0
- data/ext/stride_align/vendor/stride_align/batch.hpp +812 -0
- data/ext/stride_align/vendor/stride_align/beider_morse.hpp +121 -0
- data/ext/stride_align/vendor/stride_align/caverphone.hpp +222 -0
- data/ext/stride_align/vendor/stride_align/cologne_phonetic.hpp +202 -0
- data/ext/stride_align/vendor/stride_align/core.hpp +731 -0
- data/ext/stride_align/vendor/stride_align/daitch_mokotoff.hpp +631 -0
- data/ext/stride_align/vendor/stride_align/double_metaphone.hpp +796 -0
- data/ext/stride_align/vendor/stride_align/dtw.hpp +300 -0
- data/ext/stride_align/vendor/stride_align/encoded.hpp +235 -0
- data/ext/stride_align/vendor/stride_align/hamming.hpp +55 -0
- data/ext/stride_align/vendor/stride_align/indel.hpp +1200 -0
- data/ext/stride_align/vendor/stride_align/jaro.hpp +517 -0
- data/ext/stride_align/vendor/stride_align/lcs.hpp +159 -0
- data/ext/stride_align/vendor/stride_align/levenshtein.hpp +1247 -0
- data/ext/stride_align/vendor/stride_align/levenshtein_prepared.hpp +193 -0
- data/ext/stride_align/vendor/stride_align/match_rating.hpp +168 -0
- data/ext/stride_align/vendor/stride_align/metaphone.hpp +291 -0
- data/ext/stride_align/vendor/stride_align/ngram.hpp +176 -0
- data/ext/stride_align/vendor/stride_align/nysiis.hpp +199 -0
- data/ext/stride_align/vendor/stride_align/pairwise_alignment.hpp +465 -0
- data/ext/stride_align/vendor/stride_align/partial_ratio.hpp +486 -0
- data/ext/stride_align/vendor/stride_align/ratcliff_obershelp.hpp +101 -0
- data/ext/stride_align/vendor/stride_align/soundex.hpp +108 -0
- data/ext/stride_align/vendor/stride_align/token_ratios.hpp +445 -0
- data/ext/stride_align/vendor/stride_align/types.hpp +16 -0
- data/ext/stride_align/vendor/stride_align/utf8.hpp +512 -0
- data/ext/stride_align/vendor/stride_align/wratio.hpp +363 -0
- data/lib/stride_align/algorithms.rb +296 -0
- data/lib/stride_align/alignment_path.rb +217 -0
- data/lib/stride_align/backend.rb +47 -0
- data/lib/stride_align/batch.rb +705 -0
- data/lib/stride_align/core.rb +180 -0
- data/lib/stride_align/keyboard.rb +200 -0
- data/lib/stride_align/matrices.rb +403 -0
- data/lib/stride_align/version.rb +5 -0
- data/lib/stride_align.rb +87 -0
- metadata +231 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
"B" "" "" "a"
|
|
19
|
+
"F" "" "" "e"
|
|
20
|
+
"P" "" "" "o"
|
|
21
|
+
|
|
22
|
+
"E" "" "" "e"
|
|
23
|
+
"I" "" "" "i"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// empty
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// empty
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
"E" "" "" "e"
|
|
19
|
+
"I" "" "" "i"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
"B" "" "" "b"
|
|
19
|
+
"V" "" "" "v"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// empty
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#include gen_exact_approx_common
|
|
19
|
+
|
|
20
|
+
"ts" "" "" "C" // for not confusion Gutes [=guts] and Guts [=guc]
|
|
21
|
+
"tS" "" "" "C" // same reason
|
|
22
|
+
"S" "" "" "s"
|
|
23
|
+
"p" "" "" "f"
|
|
24
|
+
"b" "^" "" "b"
|
|
25
|
+
"b" "" "" "(b|v)"
|
|
26
|
+
"B" "" "" "(b|v)" // Spanish "b"
|
|
27
|
+
"V" "" "" "v" // Spanish "v"
|
|
28
|
+
"EE" "" "" "(1|)" // final "e" (english & french)
|
|
29
|
+
|
|
30
|
+
"ja" "" "" "i"
|
|
31
|
+
"jA" "" "" "i"
|
|
32
|
+
"je" "" "" "i"
|
|
33
|
+
"jE" "" "" "i"
|
|
34
|
+
"aj" "" "" "i"
|
|
35
|
+
"Aj" "" "" "i"
|
|
36
|
+
"I" "" "" "i"
|
|
37
|
+
"j" "" "" "i"
|
|
38
|
+
|
|
39
|
+
"a" "^" "" "1"
|
|
40
|
+
"A" "^" "" "1"
|
|
41
|
+
"e" "^" "" "1"
|
|
42
|
+
"E" "^" "" "1"
|
|
43
|
+
"Y" "^" "" "1"
|
|
44
|
+
|
|
45
|
+
"a" "" "$" "1"
|
|
46
|
+
"A" "" "$" "1"
|
|
47
|
+
"e" "" "$" "1"
|
|
48
|
+
"E" "" "$" "1"
|
|
49
|
+
"Y" "" "$" "1"
|
|
50
|
+
|
|
51
|
+
"a" "" "" ""
|
|
52
|
+
"A" "" "" ""
|
|
53
|
+
"e" "" "" ""
|
|
54
|
+
"E" "" "" ""
|
|
55
|
+
"Y" "" "" ""
|
|
56
|
+
|
|
57
|
+
"oj" "^" "" "(u|vi)"
|
|
58
|
+
"Oj" "^" "" "(u|vi)"
|
|
59
|
+
"uj" "^" "" "(u|vi)"
|
|
60
|
+
"Uj" "^" "" "(u|vi)"
|
|
61
|
+
|
|
62
|
+
"oj" "" "" "u"
|
|
63
|
+
"Oj" "" "" "u"
|
|
64
|
+
"uj" "" "" "u"
|
|
65
|
+
"Uj" "" "" "u"
|
|
66
|
+
|
|
67
|
+
"ou" "^" "" "(u|v|1)"
|
|
68
|
+
"o" "^" "" "(u|v|1)"
|
|
69
|
+
"O" "^" "" "(u|v|1)"
|
|
70
|
+
"P" "^" "" "(u|v|1)"
|
|
71
|
+
"U" "^" "" "(u|v|1)"
|
|
72
|
+
"u" "^" "" "(u|v|1)"
|
|
73
|
+
|
|
74
|
+
"o" "" "$" "(u|1)"
|
|
75
|
+
"O" "" "$" "(u|1)"
|
|
76
|
+
"P" "" "$" "(u|1)"
|
|
77
|
+
"u" "" "$" "(u|1)"
|
|
78
|
+
"U" "" "$" "(u|1)"
|
|
79
|
+
|
|
80
|
+
"ou" "" "" "u"
|
|
81
|
+
"o" "" "" "u"
|
|
82
|
+
"O" "" "" "u"
|
|
83
|
+
"P" "" "" "u"
|
|
84
|
+
"U" "" "" "u"
|
|
85
|
+
|
|
86
|
+
"VV" "" "" "u" // alef/ayin + vov from ruleshebrew
|
|
87
|
+
"V" "" "" "v" // tsvey-vov from ruleshebrew;; only Ashkenazic
|
|
88
|
+
"L" "^" "" "1" // alef/ayin from ruleshebrew
|
|
89
|
+
"L" "" "$" "1" // alef/ayin from ruleshebrew
|
|
90
|
+
"L" "" "" " " // alef/ayin from ruleshebrew
|
|
91
|
+
"WW" "^" "" "(vi|u)" // vav-yod from ruleshebrew
|
|
92
|
+
"WW" "" "" "u" // vav-yod from ruleshebrew
|
|
93
|
+
"W" "^" "" "(u|v)" // vav from ruleshebrew
|
|
94
|
+
"W" "" "" "u" // vav from ruleshebrew
|
|
95
|
+
|
|
96
|
+
//"g" "" "" "(g|Z)"
|
|
97
|
+
//"z" "" "" "(z|Z)"
|
|
98
|
+
//"d" "" "" "(d|dZ)"
|
|
99
|
+
|
|
100
|
+
"TB" "^" "" "t" // tav from ruleshebrew
|
|
101
|
+
"TB" "" "" "(t|s)" // tav from ruleshebrew; s is only Ashkenazic
|
|
102
|
+
"T" "" "" "t" // tet from ruleshebrew
|
|
103
|
+
|
|
104
|
+
//"k" "" "" "(k|x)"
|
|
105
|
+
//"x" "" "" "(k|x)"
|
|
106
|
+
"K" "" "" "k" // kof and initial kaf from ruleshebrew
|
|
107
|
+
"X" "" "" "x" // khet and final kaf from ruleshebrew
|
|
108
|
+
|
|
109
|
+
"H" "^" "" "(x|1)"
|
|
110
|
+
"H" "" "$" "(x|1)"
|
|
111
|
+
"H" "" "" "(x|)"
|
|
112
|
+
"h" "^" "" "1"
|
|
113
|
+
"h" "" "" ""
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// GENERIC
|
|
19
|
+
|
|
20
|
+
// 1. following are rules to accept the language
|
|
21
|
+
// 1.1 Special letter combinations
|
|
22
|
+
^o’ english true
|
|
23
|
+
^o' english true
|
|
24
|
+
^mc english true
|
|
25
|
+
^fitz english true
|
|
26
|
+
ceau french+romanian true
|
|
27
|
+
eau romanian true
|
|
28
|
+
eau$ french true // mp: I've added this
|
|
29
|
+
eaux$ french true // mp: I've added this
|
|
30
|
+
ault$ french true
|
|
31
|
+
oult$ french true
|
|
32
|
+
eux$ french true
|
|
33
|
+
eix$ french true
|
|
34
|
+
glou$ greeklatin true
|
|
35
|
+
uu dutch true
|
|
36
|
+
tx spanish true
|
|
37
|
+
witz german true
|
|
38
|
+
tz$ german+russian+english true
|
|
39
|
+
^tz russian+english true
|
|
40
|
+
poulos$ greeklatin true
|
|
41
|
+
pulos$ greeklatin true
|
|
42
|
+
iou greeklatin true
|
|
43
|
+
sj$ dutch true
|
|
44
|
+
^sj dutch true
|
|
45
|
+
güe spanish true
|
|
46
|
+
güi spanish true
|
|
47
|
+
ghe romanian+greeklatin true
|
|
48
|
+
ghi romanian+greeklatin true
|
|
49
|
+
escu$ romanian true
|
|
50
|
+
esco$ romanian true
|
|
51
|
+
vici$ romanian true
|
|
52
|
+
schi$ romanian true
|
|
53
|
+
ii$ russian true
|
|
54
|
+
iy$ russian true
|
|
55
|
+
yy$ russian true
|
|
56
|
+
yi$ russian true
|
|
57
|
+
^rz polish true
|
|
58
|
+
rz$ polish+german true
|
|
59
|
+
[bcdfgklmnpstwz]rz polish true
|
|
60
|
+
rz[bcdfghklmnpstw] polish true
|
|
61
|
+
cki$ polish true
|
|
62
|
+
ska$ polish true
|
|
63
|
+
cka$ polish true
|
|
64
|
+
ae german+russian+english true
|
|
65
|
+
oe german+french+russian+english+dutch true
|
|
66
|
+
th$ german+english true
|
|
67
|
+
^th german+english+greeklatin true
|
|
68
|
+
mann german true
|
|
69
|
+
cz polish true
|
|
70
|
+
cy polish+greeklatin true
|
|
71
|
+
niew polish true
|
|
72
|
+
etti$ italian true
|
|
73
|
+
eti$ italian true
|
|
74
|
+
ati$ italian true
|
|
75
|
+
ato$ italian true
|
|
76
|
+
[aoei]no$ italian true
|
|
77
|
+
[aoei]ni$ italian true
|
|
78
|
+
esi$ italian true
|
|
79
|
+
oli$ italian true
|
|
80
|
+
field$ english true
|
|
81
|
+
stein german true
|
|
82
|
+
heim$ german true
|
|
83
|
+
heimer$ german true
|
|
84
|
+
thal german true
|
|
85
|
+
zweig german true
|
|
86
|
+
[aeou]h german true
|
|
87
|
+
äh german true
|
|
88
|
+
öh german true
|
|
89
|
+
üh german true
|
|
90
|
+
[ln]h[ao]$ portuguese true
|
|
91
|
+
[ln]h[aou] portuguese+french+german+dutch+czech+spanish+turkish true
|
|
92
|
+
chsch german true
|
|
93
|
+
tsch german true
|
|
94
|
+
sch$ german+russian true
|
|
95
|
+
^sch german+russian true
|
|
96
|
+
ck$ german+english true
|
|
97
|
+
c$ polish+romanian+hungarian+czech+turkish true
|
|
98
|
+
sz polish+hungarian true
|
|
99
|
+
cs$ hungarian true
|
|
100
|
+
^cs hungarian true
|
|
101
|
+
dzs hungarian true
|
|
102
|
+
zs$ hungarian true
|
|
103
|
+
^zs hungarian true
|
|
104
|
+
^wl polish true
|
|
105
|
+
^wr polish+english+german+dutch true
|
|
106
|
+
|
|
107
|
+
gy$ hungarian true
|
|
108
|
+
gy[aeou] hungarian true
|
|
109
|
+
gy hungarian+russian+french+greeklatin true
|
|
110
|
+
guy french true
|
|
111
|
+
gu[ei] spanish+french+portuguese true
|
|
112
|
+
gu[ao] spanish+portuguese true
|
|
113
|
+
gi[aou] italian+greeklatin true
|
|
114
|
+
|
|
115
|
+
ly hungarian+russian+polish+greeklatin true
|
|
116
|
+
ny hungarian+russian+polish+spanish+greeklatin true
|
|
117
|
+
ty hungarian+russian+polish+greeklatin true
|
|
118
|
+
|
|
119
|
+
// 1.2 special characters
|
|
120
|
+
ć polish true
|
|
121
|
+
ç french+spanish+portuguese+turkish true
|
|
122
|
+
č czech true
|
|
123
|
+
ď czech true
|
|
124
|
+
ğ turkish true
|
|
125
|
+
ł polish true
|
|
126
|
+
ń polish true
|
|
127
|
+
ñ spanish true
|
|
128
|
+
ň czech true
|
|
129
|
+
ř czech true
|
|
130
|
+
ś polish true
|
|
131
|
+
ş romanian+turkish true
|
|
132
|
+
š czech true
|
|
133
|
+
ţ romanian true
|
|
134
|
+
ť czech true
|
|
135
|
+
ź polish true
|
|
136
|
+
ż polish true
|
|
137
|
+
|
|
138
|
+
ß german true
|
|
139
|
+
|
|
140
|
+
ä german true
|
|
141
|
+
á hungarian+spanish+portuguese+czech+greeklatin true
|
|
142
|
+
â romanian+french+portuguese true
|
|
143
|
+
ă romanian true
|
|
144
|
+
ą polish true
|
|
145
|
+
à portuguese true
|
|
146
|
+
ã portuguese true
|
|
147
|
+
ę polish true
|
|
148
|
+
é french+hungarian+czech+greeklatin true
|
|
149
|
+
è french+spanish+italian true
|
|
150
|
+
ê french true
|
|
151
|
+
ě czech true
|
|
152
|
+
ê french+portuguese true
|
|
153
|
+
í hungarian+spanish+portuguese+czech+greeklatin true
|
|
154
|
+
î romanian+french true
|
|
155
|
+
ı turkish true
|
|
156
|
+
ó polish+hungarian+spanish+italian+portuguese+czech+greeklatin true
|
|
157
|
+
ö german+hungarian+turkish true
|
|
158
|
+
ô french+portuguese true
|
|
159
|
+
õ portuguese+hungarian true
|
|
160
|
+
ò italian+spanish true
|
|
161
|
+
ű hungarian true
|
|
162
|
+
ú hungarian+spanish+portuguese+czech+greeklatin true
|
|
163
|
+
ü german+hungarian+spanish+portuguese+turkish true
|
|
164
|
+
ù french true
|
|
165
|
+
ů czech true
|
|
166
|
+
ý czech+greeklatin true
|
|
167
|
+
|
|
168
|
+
// Every Cyrillic word has at least one Cyrillic vowel (аёеоиуыэюя)
|
|
169
|
+
а cyrillic true
|
|
170
|
+
ё cyrillic true
|
|
171
|
+
о cyrillic true
|
|
172
|
+
е cyrillic true
|
|
173
|
+
и cyrillic true
|
|
174
|
+
у cyrillic true
|
|
175
|
+
ы cyrillic true
|
|
176
|
+
э cyrillic true
|
|
177
|
+
ю cyrillic true
|
|
178
|
+
я cyrillic true
|
|
179
|
+
|
|
180
|
+
// Every Greek word has at least one Greek vowel
|
|
181
|
+
α greek true
|
|
182
|
+
ε greek true
|
|
183
|
+
η greek true
|
|
184
|
+
ι greek true
|
|
185
|
+
ο greek true
|
|
186
|
+
υ greek true
|
|
187
|
+
ω greek true
|
|
188
|
+
|
|
189
|
+
// Arabic (only initial)
|
|
190
|
+
ا arabic true // alif (isol + init)
|
|
191
|
+
ب arabic true // ba'
|
|
192
|
+
ت arabic true // ta'
|
|
193
|
+
ث arabic true // tha'
|
|
194
|
+
ج arabic true // jim
|
|
195
|
+
ح arabic true // h.a'
|
|
196
|
+
خ' arabic true // kha'
|
|
197
|
+
د arabic true // dal (isol + init)
|
|
198
|
+
ذ arabic true // dhal (isol + init)
|
|
199
|
+
ر arabic true // ra' (isol + init)
|
|
200
|
+
ز arabic true // za' (isol + init)
|
|
201
|
+
س arabic true // sin
|
|
202
|
+
ش arabic true // shin
|
|
203
|
+
ص arabic true // s.ad
|
|
204
|
+
ض arabic true // d.ad
|
|
205
|
+
ط arabic true // t.a'
|
|
206
|
+
ظ arabic true // z.a'
|
|
207
|
+
ع arabic true // 'ayn
|
|
208
|
+
غ arabic true // ghayn
|
|
209
|
+
ف arabic true // fa'
|
|
210
|
+
ق arabic true // qaf
|
|
211
|
+
ك arabic true // kaf
|
|
212
|
+
ل arabic true // lam
|
|
213
|
+
م arabic true // mim
|
|
214
|
+
ن arabic true // nun
|
|
215
|
+
ه arabic true // ha'
|
|
216
|
+
و arabic true // waw (isol + init)
|
|
217
|
+
ي arabic true // ya'
|
|
218
|
+
|
|
219
|
+
آ arabic true // alif madda
|
|
220
|
+
إ arabic true // alif + diacritic
|
|
221
|
+
أ arabic true // alif + hamza
|
|
222
|
+
ؤ arabic true // waw + hamza
|
|
223
|
+
ئ arabic true // ya' + hamza
|
|
224
|
+
لا arabic true // ligature l+a
|
|
225
|
+
|
|
226
|
+
// Hebrew
|
|
227
|
+
א hebrew true
|
|
228
|
+
ב hebrew true
|
|
229
|
+
ג hebrew true
|
|
230
|
+
ד hebrew true
|
|
231
|
+
ה hebrew true
|
|
232
|
+
ו hebrew true
|
|
233
|
+
ז hebrew true
|
|
234
|
+
ח hebrew true
|
|
235
|
+
ט hebrew true
|
|
236
|
+
י hebrew true
|
|
237
|
+
כ hebrew true
|
|
238
|
+
ל hebrew true
|
|
239
|
+
מ hebrew true
|
|
240
|
+
נ hebrew true
|
|
241
|
+
ס hebrew true
|
|
242
|
+
ע hebrew true
|
|
243
|
+
פ hebrew true
|
|
244
|
+
צ hebrew true
|
|
245
|
+
ק hebrew true
|
|
246
|
+
ר hebrew true
|
|
247
|
+
ש hebrew true
|
|
248
|
+
ת hebrew true
|
|
249
|
+
|
|
250
|
+
// 2. following are rules to reject the language
|
|
251
|
+
|
|
252
|
+
// Every Latin character word has at least one Latin vowel
|
|
253
|
+
a cyrillic+hebrew+greek+arabic false
|
|
254
|
+
o cyrillic+hebrew+greek+arabic false
|
|
255
|
+
e cyrillic+hebrew+greek+arabic false
|
|
256
|
+
i cyrillic+hebrew+greek+arabic false
|
|
257
|
+
y cyrillic+hebrew+greek+arabic+romanian+dutch false
|
|
258
|
+
u cyrillic+hebrew+greek+arabic false
|
|
259
|
+
|
|
260
|
+
j italian false
|
|
261
|
+
j[^aoeiuy] french+spanish+portuguese+greeklatin false
|
|
262
|
+
g czech false
|
|
263
|
+
k romanian+spanish+portuguese+french+italian false
|
|
264
|
+
q hungarian+polish+russian+romanian+czech+dutch+turkish+greeklatin false
|
|
265
|
+
v polish false
|
|
266
|
+
w french+romanian+spanish+hungarian+russian+czech+turkish+greeklatin false
|
|
267
|
+
x czech+hungarian+dutch+turkish false // polish excluded from the list
|
|
268
|
+
|
|
269
|
+
dj spanish+turkish false
|
|
270
|
+
v[^aoeiu] german false // in german, "v" can be found before a vowel only
|
|
271
|
+
y[^aoeiu] german false // in german, "y" usually appears only in the last position; sometimes before a vowel
|
|
272
|
+
c[^aohk] german false
|
|
273
|
+
dzi german+english+french+turkish false
|
|
274
|
+
ou german false
|
|
275
|
+
a[eiou] turkish false // no diphthongs in Turkish
|
|
276
|
+
ö[eaiou] turkish false
|
|
277
|
+
ü[eaiou] turkish false
|
|
278
|
+
e[aiou] turkish false
|
|
279
|
+
i[aeou] turkish false
|
|
280
|
+
o[aieu] turkish false
|
|
281
|
+
u[aieo] turkish false
|
|
282
|
+
aj german+english+french+dutch false
|
|
283
|
+
ej german+english+french+dutch false
|
|
284
|
+
oj german+english+french+dutch false
|
|
285
|
+
uj german+english+french+dutch false
|
|
286
|
+
eu russian+polish false
|
|
287
|
+
ky polish false
|
|
288
|
+
kie french+spanish+greeklatin false
|
|
289
|
+
gie portuguese+romanian+spanish+greeklatin false
|
|
290
|
+
ch[aou] italian false
|
|
291
|
+
ch turkish false
|
|
292
|
+
son$ german false
|
|
293
|
+
sc[ei] french false
|
|
294
|
+
sch hungarian+polish+french+spanish false
|
|
295
|
+
^h russian false
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License"); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
any
|
|
19
|
+
arabic
|
|
20
|
+
cyrillic
|
|
21
|
+
czech
|
|
22
|
+
dutch
|
|
23
|
+
english
|
|
24
|
+
french
|
|
25
|
+
german
|
|
26
|
+
greek
|
|
27
|
+
greeklatin
|
|
28
|
+
hebrew
|
|
29
|
+
hungarian
|
|
30
|
+
italian
|
|
31
|
+
polish
|
|
32
|
+
portuguese
|
|
33
|
+
romanian
|
|
34
|
+
russian
|
|
35
|
+
spanish
|
|
36
|
+
turkish
|