foray-commit Mailing List for FOray (Page 49)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
|
From: <vic...@us...> - 2022-06-21 11:57:02
|
Revision: 12675
http://sourceforge.net/p/foray/code/12675
Author: victormote
Date: 2022-06-21 11:57:00 +0000 (Tue, 21 Jun 2022)
Log Message:
-----------
Move test results back to status quo ante.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java 2022-06-21 11:50:41 UTC (rev 12674)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java 2022-06-21 11:57:00 UTC (rev 12675)
@@ -140,11 +140,11 @@
final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
Assert.assertNotNull(hyphenation);
- /* Patterns will result in "hy-phen-a-tion. The first hyphenation point is ignored because it is too close to
- * the start. "*/
- Assert.assertEquals(2, hyphenation.qtyHyphenationPoints());
- Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(0));
- Assert.assertEquals(7, hyphenation.hyphenationPointOffsetAt(1));
+ /* Computed value is "hy-phen-a-tion". */
+ Assert.assertEquals(3, hyphenation.qtyHyphenationPoints());
+ Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
+ Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(1));
+ Assert.assertEquals(7, hyphenation.hyphenationPointOffsetAt(2));
}
/**
@@ -182,11 +182,12 @@
final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
Assert.assertNotNull(hyphenation);
- /* Patterns will result in "ob-lig-a-to-ry. Both the first and last hyphenation points are ignored because they
- * are too close to the ends. "*/
- Assert.assertEquals(2, hyphenation.qtyHyphenationPoints());
- Assert.assertEquals(5, hyphenation.hyphenationPointOffsetAt(0));
- Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(1));
+ /* Computed value is "ob-lig-a-to-ry". */
+ Assert.assertEquals(4, hyphenation.qtyHyphenationPoints());
+ Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
+ Assert.assertEquals(5, hyphenation.hyphenationPointOffsetAt(1));
+ Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(2));
+ Assert.assertEquals(8, hyphenation.hyphenationPointOffsetAt(3));
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-21 11:50:49
|
Revision: 12674
http://sourceforge.net/p/foray/code/12674
Author: victormote
Date: 2022-06-21 11:50:41 +0000 (Tue, 21 Jun 2022)
Log Message:
-----------
1. Doc and reference changes for unknown country from "999" to "ZZZ". 2. Change some test results to match results after min-before and min-after hyphenation criteria are applied.
Modified Paths:
--------------
trunk/foray/foray-00-master/ide/eclipse/launch-configurations/DictionarySerializer.launch
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java
trunk/foray/foray-orthography/src/test/resources/orthography-config.xml
Modified: trunk/foray/foray-00-master/ide/eclipse/launch-configurations/DictionarySerializer.launch
===================================================================
--- trunk/foray/foray-00-master/ide/eclipse/launch-configurations/DictionarySerializer.launch 2022-06-21 00:08:14 UTC (rev 12673)
+++ trunk/foray/foray-00-master/ide/eclipse/launch-configurations/DictionarySerializer.launch 2022-06-21 11:50:41 UTC (rev 12674)
@@ -16,6 +16,6 @@
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.foray.orthography.util.DictionarySerializer"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="foray-orthography"/>
- <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--input ${project_loc}/src/main/data/dictionaries --output ${project_loc}/src/main/resources/resources/org/foray/dictionaries --pattern "eng-Latn-999.dict.txt""/>
+ <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--input ${project_loc}/src/main/data/dictionaries --output ${project_loc}/src/main/resources/resources/org/foray/dictionaries --pattern "eng-Latn-ZZZ.dict.txt""/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="foray-orthography"/>
</launchConfiguration>
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml 2022-06-21 00:08:14 UTC (rev 12673)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-GBR.dict.xml 2022-06-21 11:50:41 UTC (rev 12674)
@@ -12,7 +12,7 @@
differ between American and British usage.
See eng-USA-Latn.dict.xml for the American spellings.
Words that are common to both dialects should be placed in
-eng-Latn-999.dict.xml.
+eng-Latn-ZZZ.dict.xml.
-->
<w><t>co=la-bour-er</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml 2022-06-21 00:08:14 UTC (rev 12673)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-USA.dict.xml 2022-06-21 11:50:41 UTC (rev 12674)
@@ -12,7 +12,7 @@
differ between American and British usage.
See eng-GBR-Latn.dict.xml for the British spellings.
Words that are common to both dialects should be placed in
-eng-Latn-999.dict.xml.
+eng-Latn-ZZZ.dict.xml.
-->
<w><t>co=la-bor-er</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java 2022-06-21 00:08:14 UTC (rev 12673)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java 2022-06-21 11:50:41 UTC (rev 12674)
@@ -140,10 +140,11 @@
final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
Assert.assertNotNull(hyphenation);
- Assert.assertEquals(3, hyphenation.qtyHyphenationPoints());
- Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
- Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(1));
- Assert.assertEquals(7, hyphenation.hyphenationPointOffsetAt(2));
+ /* Patterns will result in "hy-phen-a-tion. The first hyphenation point is ignored because it is too close to
+ * the start. "*/
+ Assert.assertEquals(2, hyphenation.qtyHyphenationPoints());
+ Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(0));
+ Assert.assertEquals(7, hyphenation.hyphenationPointOffsetAt(1));
}
/**
@@ -181,11 +182,11 @@
final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
Assert.assertNotNull(hyphenation);
- Assert.assertEquals(4, hyphenation.qtyHyphenationPoints());
- Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
- Assert.assertEquals(5, hyphenation.hyphenationPointOffsetAt(1));
- Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(2));
- Assert.assertEquals(8, hyphenation.hyphenationPointOffsetAt(3));
+ /* Patterns will result in "ob-lig-a-to-ry. Both the first and last hyphenation points are ignored because they
+ * are too close to the ends. "*/
+ Assert.assertEquals(2, hyphenation.qtyHyphenationPoints());
+ Assert.assertEquals(5, hyphenation.hyphenationPointOffsetAt(0));
+ Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(1));
}
/**
Modified: trunk/foray/foray-orthography/src/test/resources/orthography-config.xml
===================================================================
--- trunk/foray/foray-orthography/src/test/resources/orthography-config.xml 2022-06-21 00:08:14 UTC (rev 12673)
+++ trunk/foray/foray-orthography/src/test/resources/orthography-config.xml 2022-06-21 11:50:41 UTC (rev 12674)
@@ -23,14 +23,14 @@
<dictionary-resource id="dictionary-eng-moby">
<parsed-resource>
- <resource-location type="classpath">/resources/org/foray/dictionaries/eng-Latn-999.jbso</resource-location>
+ <resource-location type="classpath">/resources/org/foray/dictionaries/eng-Latn-ZZZ.jbso</resource-location>
</parsed-resource>
<parsed-resource>
- <resource-location type="url">file:../foray-orthography/src/main/resources/resources/org/foray/dictionaries/eng-Latn-999.jbso</resource-location>
+ <resource-location type="url">file:../foray-orthography/src/main/resources/resources/org/foray/dictionaries/eng-Latn-ZZZ.jbso</resource-location>
</parsed-resource>
<unparsed-dictionary>
<dictionary-element>
- <resource-location type="url">file:../foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml</resource-location>
+ <resource-location type="url">file:../foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml</resource-location>
<exclusion regex-pattern="^[A-Z]"/>
</dictionary-element>
</unparsed-dictionary>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-21 00:08:17
|
Revision: 12673
http://sourceforge.net/p/foray/code/12673
Author: victormote
Date: 2022-06-21 00:08:14 +0000 (Tue, 21 Jun 2022)
Log Message:
-----------
Don't report breaks that are near the beginning or end of the word, as specified in the patterns configuration.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 23:41:32 UTC (rev 12672)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-21 00:08:14 UTC (rev 12673)
@@ -35,6 +35,7 @@
import org.foray.common.data.TernaryTree;
import org.foray.common.primitive.BitUtils;
+import org.foray.common.primitive.NumberUtils;
import org.foray.common.primitive.StringUtils;
import org.foray.common.sequence.NibbleArrayBuilder;
@@ -408,12 +409,24 @@
if (interletterValue == 0) {
return false;
}
- /* If the value is odd, then it is not an inhibitor. */
- if ((interletterValue & 1) == 1) {
- return true;
+
+ if (! NumberUtils.isOdd(interletterValue)) {
+ /* The value is even, therefore an inhibitor and should not be included. */
+ return false;
}
- /* The value is an inhibitor and should not be included. */
- return false;
+
+ /* The value is odd, and therefore not an inhibitor. See if it is too close to the beginning or ending of the
+ * word. */
+ if (index < this.minBefore) {
+ /* Too close to the beginning of the word. Not enough characters at the end of the current line. */
+ return false;
+ }
+ if (length - index < this.minAfter) {
+ /* Too close to the end of the word. Not enough characters at the start of the next line. */
+ return false;
+ }
+
+ return true;
}
/**
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java 2022-06-20 23:41:32 UTC (rev 12672)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java 2022-06-21 00:08:14 UTC (rev 12673)
@@ -102,7 +102,9 @@
public void hyphenateTest02() throws IOException, OrthographyException {
final String testString = "hyphenation";
final StringWord actual = PatternTreeTests.patternTree.hyphenate(testString, 0, testString.length());
- Assert.assertEquals(7, actual.qtyWordComponents());
+ Assert.assertEquals(5, actual.qtyWordComponents());
+ /* Patterns allow for "hy-phen-a-tion", but the "hy-" is less than the minimum of 3. */
+ Assert.assertEquals("hyphen-a-tion", actual.toString());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 23:41:42
|
Revision: 12672
http://sourceforge.net/p/foray/code/12672
Author: victormote
Date: 2022-06-20 23:41:32 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Fix error in test for end of for-loop.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 23:24:45 UTC (rev 12671)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 23:41:32 UTC (rev 12672)
@@ -231,11 +231,12 @@
* However the cost of creating NodeIterator instances or managing them for reuse might be higher than the
* performance benefits gained. */
this.logger.debug("Word: {}", word.subSequence(startingWordIndex, word.length()).toString());
- for (int endingWordIndex = startingWordIndex + 1; endingWordIndex == word.length(); endingWordIndex++) {
+ for (int endingWordIndex = startingWordIndex + 1; endingWordIndex <= word.length(); endingWordIndex++) {
final int index = this.patternKeys.get(word, startingWordIndex, endingWordIndex);
if (index >= 0) {
- this.logger.debug("Pattern match: {}", word.subSequence(startingWordIndex, endingWordIndex).toString());
final byte[] values = getValues(index);
+ this.logger.debug("Pattern match: {}, values: {}",
+ word.subSequence(startingWordIndex, endingWordIndex).toString(), values);
updateInterletterValues(il, startingWordIndex, values);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 23:24:53
|
Revision: 12671
http://sourceforge.net/p/foray/code/12671
Author: victormote
Date: 2022-06-20 23:24:45 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
1. Add logging. 2. Convert some char[] APIs to CharSequence.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 20:27:13 UTC (rev 12670)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 23:24:45 UTC (rev 12671)
@@ -40,6 +40,9 @@
import org.axsl.orthography.OrthographyException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
@@ -97,6 +100,9 @@
/** Value indicating the termination of a pattern value in the vector. */
private static final byte PATTERN_VALUES_TERMINATOR = (byte) 0xF;
+ /** The logger. */
+ private transient Logger logger = LoggerFactory.getLogger(PatternTree.class);
+
/** The source of this tree. Used by testing routines to make sure that the serialized versions
* are getting used. */
private transient Source source;
@@ -214,7 +220,7 @@
* @param startingWordIndex The starting index in word that should be tested.
* @param il The interletter values array that should be updated.
*/
- private void searchPatterns(final char[] word, final int startingWordIndex, final byte[] il) {
+ private void searchPatterns(final CharSequence word, final int startingWordIndex, final byte[] il) {
/* TODO: The following commented code works, but is not as performant as it could be.
* The problem is that it must start over at the beginning of each iteration of the "for" loop, rather than
* retaining its state as it passes over each character in the ternary tree.
@@ -224,9 +230,11 @@
* NodeIterator inner class in TernaryTreeMap that can keep track of that state as a map search is being done.
* However the cost of creating NodeIterator instances or managing them for reuse might be higher than the
* performance benefits gained. */
- for (int endingWordIndex = startingWordIndex; endingWordIndex < word.length; endingWordIndex++) {
+ this.logger.debug("Word: {}", word.subSequence(startingWordIndex, word.length()).toString());
+ for (int endingWordIndex = startingWordIndex + 1; endingWordIndex == word.length(); endingWordIndex++) {
final int index = this.patternKeys.get(word, startingWordIndex, endingWordIndex);
if (index >= 0) {
+ this.logger.debug("Pattern match: {}", word.subSequence(startingWordIndex, endingWordIndex).toString());
final byte[] values = getValues(index);
updateInterletterValues(il, startingWordIndex, values);
}
@@ -254,14 +262,13 @@
/**
* Hyphenate word and return an array of hyphenation points.
- * @param inputCharArray char array that contains the word
- * @param offset Offset to first character in word
- * @param len Length of word
- * @return a {@link StringWord Hyphenation} object representing
- * the hyphenated word or null if word is not hyphenated.
+ * @param sequence Char sequence that contains the word.
+ * @param offset Offset to first character in word.
+ * @param len Length of word.
+ * @return a {@link StringWord} object representing the hyphenated word or null if word is not hyphenated.
*/
- StringWord hyphenate(final CharSequence inputCharArray, final int offset, final int len) {
- final String normalizedWord = normalizeWord(inputCharArray, offset, len);
+ StringWord hyphenate(final CharSequence sequence, final int offset, final int len) {
+ final String normalizedWord = normalizeWord(sequence, offset, len);
if (normalizedWord == null) {
return null;
}
@@ -278,6 +285,15 @@
}
/**
+ * Hyphenate word and return an array of hyphenation points.
+ * @param sequence Char sequence that contains the word.
+ * @return a {@link StringWord} object representing the hyphenated word or null if word is not hyphenated.
+ */
+ StringWord hyphenate(final CharSequence sequence) {
+ return hyphenate(sequence, 0, sequence.length());
+ }
+
+ /**
* Trims the raw arrays so that the created hyphenation instance is as compact as possible.
* @param theWord The word that is being hyphenated.
* @param points The hyphenation points.
@@ -337,37 +353,33 @@
*/
private StringWord checkPatterns(final String normalizedWord) {
- /* Create the array of test characters to be used in the pattern
- * searches. */
- final char[] testChars = new char[normalizedWord.length()
- + PatternTree.QTY_MARKER_CHARS];
- /* Copy the String contents to the new array, but skip the first
- * element. */
- normalizedWord.getChars(0, normalizedWord.length(), testChars, 1);
- /* Add word start marker at first element. */
- testChars[0] = '.';
- /* Add word end marker at next-to-last element. */
- testChars[normalizedWord.length() + 1] = '.';
- /* Add null character at last element to terminate the String. */
- testChars[testChars.length - 1] = StringUtils.NULL_TERMINATOR;
+ /* Create the characters to be used in the pattern searches. */
+ final StringBuilder builder = new StringBuilder(normalizedWord.length() + PatternTree.QTY_MARKER_CHARS);
+ /* Add word start marker. */
+ builder.append('.');
+ /* Add the word content. */
+ builder.append(normalizedWord);
+ /* Add word end marker. */
+ builder.append('.');
+ /* Add null character to terminate the String. */
+ builder.append(StringUtils.NULL_TERMINATOR);
/* Create empty array for the interletter values. */
- final int len = normalizedWord.length();
- final byte[] interletterValues = new byte[testChars.length];
+ final byte[] interletterValues = new byte[builder.length()];
/* Populate the array from the patterns. */
- for (int i = 0; i < len + 1; i++) {
- searchPatterns(testChars, i, interletterValues);
+ for (int i = 0; i < normalizedWord.length() + 1; i++) {
+ searchPatterns(builder, i, interletterValues);
}
- final byte[] result = new byte[len + 1];
+ final byte[] result = new byte[normalizedWord.length() + 1];
final byte[] values = new byte[result.length];
int k = 0;
/* There should never be a hyphenation point at the beginning of the word (i.e. before the first character in
* the word). Therefore start the index at 1 instead of 0. */
- for (int i = 1; i < len; i++) {
+ for (int i = 1; i < normalizedWord.length(); i++) {
final byte interletterValue = interletterValues[i + 1];
- final boolean reportValue = reportValue(interletterValue, i, len);
+ final boolean reportValue = reportValue(interletterValue, i, normalizedWord.length());
if (reportValue) {
result[k] = (byte) i;
values[k] = interletterValue;
@@ -517,13 +529,12 @@
* @param rawPattern The raw Liang-style pattern to be added, for example ".ab4i".
*/
public void addPattern(final String rawPattern) {
- /* Split the pattern into its raw characters and its inter-letter
- * values. */
+ /* Split the pattern into its raw characters and its inter-letter values. */
final String pattern = getPatternChars(rawPattern);
final String ivalue = getInterletterValues(rawPattern);
int k = this.tempInterletterValues.get(ivalue);
- if (k <= 0) {
+ if (k < 0) {
k = packValues(ivalue);
this.tempInterletterValues.put(ivalue, k);
}
@@ -533,10 +544,8 @@
/**
* Extract the character sequence from a Liang-style hyphenation pattern.
* @param pattern The raw pattern to be parsed.
- * @return The pattern character, that is, the pattern with the inter-letter
- * values removed.
- * For example, if {@code pattern} is the Liang pattern ".ab4i", the
- * return value should be ".abi".
+ * @return The pattern character, that is, the pattern with the inter-letter values removed.
+ * For example, if {@code pattern} is the Liang pattern ".ab4i", the return value should be ".abi".
*/
public static String getPatternChars(final String pattern) {
final StringBuilder pat = new StringBuilder();
@@ -550,21 +559,18 @@
}
/**
- * Extract the inter-letter values from a given pattern, returning them as
- * a String.
- * Values for the slot before the first character and after the last
- * character should be included.
+ * Extract the inter-letter values from a given pattern, returning them as a String.
+ * Values for the slot before the first character and after the last character should be included.
* @param pattern The pattern whose inter-letter values should be extracted.
- * @return The inter-letter values indicating the desirability and priority
- * of hyphenating at a given point within the pattern.
+ * @return The inter-letter values indicating the desirability and priority of hyphenating at a given point within
+ * the pattern.
* It should contain only digit characters (i.e. '0' to '9').
- * The size of the return String should be one greater than the size of
- * {@link #getPatternChars(String)} for the same pattern.
- * This is because values are included for the slot immediately before the
- * first character in {@code pattern}, and for the slot immediately
- * after the last character in {@code pattern}.
- * For example, for a {@code pattern} of ".ab4i", which could be translated into
- * a fully-expanded pattern of "0.0a0b4i0", the return value should be "00040".
+ * The size of the return String should be one greater than the size of {@link #getPatternChars(String)} for the
+ * same pattern.
+ * This is because values are included for the slot immediately before the first character in {@code pattern}, and
+ * for the slot immediately after the last character in {@code pattern}.
+ * For example, for a {@code pattern} of ".ab4i", which could be translated into a fully-expanded pattern of
+ * "0.0a0b4i0", the return value should be "00040".
*/
public static String getInterletterValues(final String pattern) {
final StringBuilder il = new StringBuilder();
@@ -633,6 +639,7 @@
ClassNotFoundException {
in.defaultReadObject();
this.source = PatternTree.Source.RESOURCES;
+ this.logger = LoggerFactory.getLogger(PatternTree.class);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 20:27:20
|
Revision: 12670
http://sourceforge.net/p/foray/code/12670
Author: victormote
Date: 2022-06-20 20:27:13 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Add another assertion for PatternParser.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/PatternParserTests.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 20:24:12 UTC (rev 12669)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 20:27:13 UTC (rev 12670)
@@ -118,19 +118,19 @@
/**
* <p>The vector of interletter values for the Liang patterns.
* The keys to this vector are in {@link #patternKeys}.
- * The pattern values themselves are stored as bytes, and are expected to be
- * in the range of 0x01 through 0x05.</p>
+ * The pattern values themselves are stored as nibbles, and are expected to be in the range of 0x01 through
+ * 0x05.</p>
*/
private NibbleArrayBuilder patternValues = new NibbleArrayBuilder();
/** The hyphenation exceptions. */
- private Map<String, StringWord> exceptions
- = new HashMap<String, StringWord>();
+ private Map<String, StringWord> exceptions = new HashMap<String, StringWord>();
/** The character classes. */
private TernaryTree classes = new TernaryTree();
- /** Temporary map to store interletter values during pattern loading. */
+ /** Temporary map to store interletter values during pattern loading. This is used to prevent duplicate interletter
+ * values from being created. */
private transient TernaryTree tempInterletterValues = new TernaryTree();
/**
@@ -525,9 +525,9 @@
int k = this.tempInterletterValues.get(ivalue);
if (k <= 0) {
k = packValues(ivalue);
- this.tempInterletterValues.put(ivalue, (char) k);
+ this.tempInterletterValues.put(ivalue, k);
}
- this.patternKeys.put(pattern, (char) k);
+ this.patternKeys.put(pattern, k);
}
/**
@@ -659,4 +659,12 @@
return this.minAfter;
}
+ /**
+ * Returns the pattern keys.
+ * @return The pattern keys.
+ */
+ public TernaryTree getPatternKeys() {
+ return this.patternKeys;
+ }
+
}
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/PatternParserTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/PatternParserTests.java 2022-06-20 20:24:12 UTC (rev 12669)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/PatternParserTests.java 2022-06-20 20:27:13 UTC (rev 12670)
@@ -28,6 +28,7 @@
package org.foray.orthography.util;
+import org.foray.common.data.TernaryTree;
import org.foray.orthography.PatternTree;
import org.xml.sax.InputSource;
@@ -94,6 +95,9 @@
Assert.assertEquals(3, patternTree.getMinBefore());
Assert.assertEquals(2, patternTree.getMinAfter());
+ final TernaryTree patternKeys = patternTree.getPatternKeys();
+ Assert.assertEquals(11, patternKeys.size());
+
/* TODO: Add more assertions here. */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 20:24:15
|
Revision: 12669
http://sourceforge.net/p/foray/code/12669
Author: victormote
Date: 2022-06-20 20:24:12 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
New serializations of hyphenation pattern files, reflecting change to class path.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/eng.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/fin.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/hun.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/ita.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/mah.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/pol.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/por.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/rus.jbso
trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/spa.jbso
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/eng.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/fin.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/hun.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/ita.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/mah.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/pol.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/por.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/rus.jbso
===================================================================
(Binary files differ)
Modified: trunk/foray/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/spa.jbso
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 18:32:44
|
Revision: 12668
http://sourceforge.net/p/foray/code/12668
Author: victormote
Date: 2022-06-20 18:32:41 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Move NibbleArrayBuilder to correct package. Rough-in implementation of related aXSL interface.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java
Added Paths:
-----------
trunk/foray/foray-common/src/main/java/org/foray/common/sequence/NibbleArrayBuilder.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/NibbleArrayBuilderTests.java
Removed Paths:
-------------
trunk/foray/foray-common/src/main/java/org/foray/common/data/NibbleArrayBuilder.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/NibbleArrayBuilderTests.java
Deleted: trunk/foray/foray-common/src/main/java/org/foray/common/data/NibbleArrayBuilder.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/data/NibbleArrayBuilder.java 2022-06-20 17:30:22 UTC (rev 12667)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/data/NibbleArrayBuilder.java 2022-06-20 18:32:41 UTC (rev 12668)
@@ -1,253 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.WellKnownConstants;
-import org.foray.common.primitive.BitUtils;
-import org.foray.common.primitive.NumberUtils;
-import org.foray.common.sequence.ByteArrayBuilder;
-
-import java.io.Serializable;
-
-/**
- * A vector of nibbles, or half bytes. The purpose of this class is to reduce by approximately half
- * the amount of memory needed to store a data structure which only needs 4 bits for each element.
- */
-public class NibbleArrayBuilder implements Serializable {
-
- /** Constant needed for serialization. */
- private static final long serialVersionUID = -8706615311680792485L;
-
- /** Default Capacity increment size. */
- private static final int DEFAULT_BLOCK_SIZE = 2048;
-
- /** Capacity increment size. */
- private int blockSize = NibbleArrayBuilder.DEFAULT_BLOCK_SIZE;
-
- /** The encapsulated ByteArrayBuilder that actually contains the data. */
- private ByteArrayBuilder backingVector;
-
- /** Index to to the next free item in this vector. */
- private int nextIndex = 0;
-
- /**
- * No-argument constructor.
- */
- public NibbleArrayBuilder() {
- this(NibbleArrayBuilder.DEFAULT_BLOCK_SIZE);
- }
-
- /**
- * Constructor.
- * @param capacity The initial capacity, in half-bytes, of the new vector.
- */
- public NibbleArrayBuilder(final int capacity) {
- if (capacity > 0) {
- this.blockSize = capacity;
- } else {
- this.blockSize = NibbleArrayBuilder.DEFAULT_BLOCK_SIZE;
- }
- final int byteCapacity = computeByteCapacity(this.blockSize);
- this.backingVector = new ByteArrayBuilder(byteCapacity);
- }
-
- /**
- * Returns the number of half-byte items in the vector.
- * @return The number of items in the vector.
- */
- public int length() {
- return this.nextIndex;
- }
-
- /**
- * Returns the number of bytes actually used to store the vector content.
- * @return The number of bytes used to store the vector content.
- */
- public int lengthInBytes() {
- return this.backingVector.length();
- }
-
- /**
- * Returns the current capacity of the vector, in half-bytes.
- * @return The currect capacity of the vector.
- */
- public int capacity() {
- return this.backingVector.capacity() * 2;
- }
-
- /**
- * Converts an index specified for nibbles into the correct index to use to retrieve the byte
- * containing that nibble.
- * @param nibbleIndex The index to the nibble.
- * @return The index to the matching byte.
- */
- public int computeByteIndex(final int nibbleIndex) {
- return nibbleIndex / 2;
- }
-
- /**
- * Converts an capacity specified for nibbles into the correct capacity to use to for bytes.
- * This is similar to {@link #computeByteIndex(int)}, but rounds the number of bytes up to
- * ensure that all half-bytes have room.
- * @param nibbleCapacity The capacity in half-bytes.
- * @return The capacity in bytes.
- */
- int computeByteCapacity(final int nibbleCapacity) {
- int byteCapacity = nibbleCapacity / 2;
- if (NumberUtils.isOdd(nibbleCapacity)) {
- byteCapacity ++;
- }
- return byteCapacity;
- }
-
- /**
- * Adds one element to the vector.
- * @param value The half-byte value to be added to the vector.
- * This must be in the range 0x0 thru 0xF.
- */
- public void add(final byte value) {
- alloc(1);
- set(this.nextIndex - 1, value);
- }
-
- /**
- * Adds the content of a byte array to this vector.
- * @param value The array of half-byte values to be added to the vector.
- * Each element must be in the range 0x0 thru 0xF.
- */
- public void add(final byte[] value) {
- for (int i = 0; i < value.length; i++) {
- add(value[i]);
- }
- }
-
- /**
- * Place an item in the vector at a specific index.
- * @param index The 0-based index into the vector.
- * @param value The half-byte value to be placed in the vector. This must be in the range
- * 0x0 thru 0xF.
- */
- public void set(final int index, final byte value) {
- validateInput(value);
- final int byteIndex = computeByteIndex(index);
- final byte oldValue = this.backingVector.get(byteIndex);
- byte newValue = 0x0;
- if (NumberUtils.isOdd(index)) {
- /* If the index is odd, place the input nibble into the low-order bits. */
- newValue = BitUtils.maskLowOrderBits(oldValue);
- newValue = (byte) (newValue | value);
- } else {
- /* If the index is even, place the input nibble into the high-order bits. */
- newValue = BitUtils.maskHighOrderBits(oldValue);
- final byte shiftedValue = (byte) (value << WellKnownConstants.BITS_PER_NIBBLE);
- newValue = (byte) (newValue | shiftedValue);
- }
-
- this.backingVector.set(byteIndex, newValue);
- }
-
- /**
- * Retrieve a value from a specific index in the vector.
- * @param index The 0-based index whose value should be returned.
- * @return The value at {@code index}.
- */
- public byte get(final int index) {
- final int byteIndex = computeByteIndex(index);
- final byte byteValue = this.backingVector.get(byteIndex);
- byte nibbleValue = 0x0;
- if (NumberUtils.isOdd(index)) {
- /* If the index is odd, return just the low-order bits. */
- nibbleValue = BitUtils.maskHighOrderBits(byteValue);
- } else {
- /* If the index is even, return just the high-order bits. */
- nibbleValue = (byte) (byteValue >>> WellKnownConstants.BITS_PER_NIBBLE);
- /* Have to mask out the high-order bits after the cast, in case the shifted value has
- * the high-order bit set, and therefore looks negative -- in that case the caset sets
- * all of the high-order bits. */
- nibbleValue = BitUtils.maskHighOrderBits(nibbleValue);
- }
-
- return nibbleValue;
- }
-
- /**
- * Allocates or uses a specified number of elements (half-bytes).
- * If needed, this method automatically increases the vector's capacity.
- * @param size The number of elements (half-bytes) to be allocated.
- * @return The index to the beginning of the allocated elements (half-bytes).
- */
- private int alloc(final int size) {
- final int index = this.nextIndex;
- final int minimumCapacity = this.nextIndex + size;
- final int minimumByteCapacity = computeByteCapacity(minimumCapacity);
- final int bytesToAdd = minimumByteCapacity - this.backingVector.length();
- this.backingVector.alloc(bytesToAdd);
- this.nextIndex += size;
- return index;
- }
-
- /**
- * Sets the capacity of this vector equal to its size, to that there is no
- * unused capacity.
- */
- public void trimToSize() {
- this.backingVector.trimToSize();
- }
-
- /**
- * Returns the index of the first occurrence of a specified value in the vector.
- * @param value The value whose index is sought.
- * @param startingIndex The index in the vector at which the search should be started.
- * @return The index to the first occurrence of {@code value} at or after {@code startingIndex}, or -1 if it does
- * not occur in the vector.
- */
- public int indexOf(final byte value, final int startingIndex) {
- validateInput(value);
- for (int i = startingIndex; i < this.nextIndex; i++) {
- if (this.get(i) == value) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Ensures that an input byte is in the correct range, throwing an
- * {@link IllegalArgumentException} if it is not.
- * @param inputByte The byte to be tested for suitability in a packed vector.
- */
- private void validateInput(final byte inputByte) {
- if (inputByte < 0
- || inputByte > WellKnownConstants.MAX_4_BIT_UNSIGNED_BYTE) {
- throw new IllegalArgumentException("Expected val in the range 0x0 to 0xF: "
- + inputByte);
- }
- }
-
-}
Copied: trunk/foray/foray-common/src/main/java/org/foray/common/sequence/NibbleArrayBuilder.java (from rev 12650, trunk/foray/foray-common/src/main/java/org/foray/common/data/NibbleArrayBuilder.java)
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/sequence/NibbleArrayBuilder.java (rev 0)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/sequence/NibbleArrayBuilder.java 2022-06-20 18:32:41 UTC (rev 12668)
@@ -0,0 +1,413 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.sequence;
+
+import org.foray.common.WellKnownConstants;
+import org.foray.common.primitive.BitUtils;
+import org.foray.common.primitive.NumberUtils;
+
+import org.axsl.utility.sequence.NibblePrimitiveIterator;
+import org.axsl.utility.sequence.NibbleSequence;
+import org.axsl.utility.sequence.NibbleSequenceMutable;
+import org.axsl.utility.sequence.NibbleSequencePlus;
+
+import java.io.Serializable;
+
+/**
+ * A vector of nibbles, or half bytes. The purpose of this class is to reduce by approximately half
+ * the amount of memory needed to store a data structure which only needs 4 bits for each element.
+ */
+public class NibbleArrayBuilder implements NibbleSequenceMutable, Serializable {
+
+ /** Constant needed for serialization. */
+ private static final long serialVersionUID = -8706615311680792485L;
+
+ /** Default Capacity increment size. */
+ private static final int DEFAULT_BLOCK_SIZE = 2048;
+
+ /** Capacity increment size. */
+ private int blockSize = NibbleArrayBuilder.DEFAULT_BLOCK_SIZE;
+
+ /** The encapsulated ByteArrayBuilder that actually contains the data. */
+ private ByteArrayBuilder backingVector;
+
+ /** Index to to the next free item in this vector. */
+ private int nextIndex = 0;
+
+ /**
+ * No-argument constructor.
+ */
+ public NibbleArrayBuilder() {
+ this(NibbleArrayBuilder.DEFAULT_BLOCK_SIZE);
+ }
+
+ /**
+ * Constructor.
+ * @param capacity The initial capacity, in half-bytes, of the new vector.
+ */
+ public NibbleArrayBuilder(final int capacity) {
+ if (capacity > 0) {
+ this.blockSize = capacity;
+ } else {
+ this.blockSize = NibbleArrayBuilder.DEFAULT_BLOCK_SIZE;
+ }
+ final int byteCapacity = computeByteCapacity(this.blockSize);
+ this.backingVector = new ByteArrayBuilder(byteCapacity);
+ }
+
+ /**
+ * Returns the number of half-byte items in the vector.
+ * @return The number of items in the vector.
+ */
+ public int length() {
+ return this.nextIndex;
+ }
+
+ /**
+ * Returns the number of bytes actually used to store the vector content.
+ * @return The number of bytes used to store the vector content.
+ */
+ public int lengthInBytes() {
+ return this.backingVector.length();
+ }
+
+ /**
+ * Returns the current capacity of the vector, in half-bytes.
+ * @return The currect capacity of the vector.
+ */
+ public int capacity() {
+ return this.backingVector.capacity() * 2;
+ }
+
+ /**
+ * Converts an index specified for nibbles into the correct index to use to retrieve the byte
+ * containing that nibble.
+ * @param nibbleIndex The index to the nibble.
+ * @return The index to the matching byte.
+ */
+ public int computeByteIndex(final int nibbleIndex) {
+ return nibbleIndex / 2;
+ }
+
+ /**
+ * Converts an capacity specified for nibbles into the correct capacity to use to for bytes.
+ * This is similar to {@link #computeByteIndex(int)}, but rounds the number of bytes up to
+ * ensure that all half-bytes have room.
+ * @param nibbleCapacity The capacity in half-bytes.
+ * @return The capacity in bytes.
+ */
+ int computeByteCapacity(final int nibbleCapacity) {
+ int byteCapacity = nibbleCapacity / 2;
+ if (NumberUtils.isOdd(nibbleCapacity)) {
+ byteCapacity ++;
+ }
+ return byteCapacity;
+ }
+
+ /**
+ * Adds one element to the vector.
+ * @param value The half-byte value to be added to the vector.
+ * This must be in the range 0x0 thru 0xF.
+ */
+ public void add(final byte value) {
+ alloc(1);
+ set(this.nextIndex - 1, value);
+ }
+
+ /**
+ * Adds the content of a byte array to this vector.
+ * @param value The array of half-byte values to be added to the vector.
+ * Each element must be in the range 0x0 thru 0xF.
+ */
+ public void add(final byte[] value) {
+ for (int i = 0; i < value.length; i++) {
+ add(value[i]);
+ }
+ }
+
+ /**
+ * Place an item in the vector at a specific index.
+ * @param index The 0-based index into the vector.
+ * @param value The half-byte value to be placed in the vector. This must be in the range
+ * 0x0 thru 0xF.
+ */
+ public void set(final int index, final byte value) {
+ validateInput(value);
+ final int byteIndex = computeByteIndex(index);
+ final byte oldValue = this.backingVector.get(byteIndex);
+ byte newValue = 0x0;
+ if (NumberUtils.isOdd(index)) {
+ /* If the index is odd, place the input nibble into the low-order bits. */
+ newValue = BitUtils.maskLowOrderBits(oldValue);
+ newValue = (byte) (newValue | value);
+ } else {
+ /* If the index is even, place the input nibble into the high-order bits. */
+ newValue = BitUtils.maskHighOrderBits(oldValue);
+ final byte shiftedValue = (byte) (value << WellKnownConstants.BITS_PER_NIBBLE);
+ newValue = (byte) (newValue | shiftedValue);
+ }
+
+ this.backingVector.set(byteIndex, newValue);
+ }
+
+ /**
+ * Retrieve a value from a specific index in the vector.
+ * @param index The 0-based index whose value should be returned.
+ * @return The value at {@code index}.
+ */
+ public byte get(final int index) {
+ final int byteIndex = computeByteIndex(index);
+ final byte byteValue = this.backingVector.get(byteIndex);
+ byte nibbleValue = 0x0;
+ if (NumberUtils.isOdd(index)) {
+ /* If the index is odd, return just the low-order bits. */
+ nibbleValue = BitUtils.maskHighOrderBits(byteValue);
+ } else {
+ /* If the index is even, return just the high-order bits. */
+ nibbleValue = (byte) (byteValue >>> WellKnownConstants.BITS_PER_NIBBLE);
+ /* Have to mask out the high-order bits after the cast, in case the shifted value has
+ * the high-order bit set, and therefore looks negative -- in that case the caset sets
+ * all of the high-order bits. */
+ nibbleValue = BitUtils.maskHighOrderBits(nibbleValue);
+ }
+
+ return nibbleValue;
+ }
+
+ /**
+ * Allocates or uses a specified number of elements (half-bytes).
+ * If needed, this method automatically increases the vector's capacity.
+ * @param size The number of elements (half-bytes) to be allocated.
+ * @return The index to the beginning of the allocated elements (half-bytes).
+ */
+ private int alloc(final int size) {
+ final int index = this.nextIndex;
+ final int minimumCapacity = this.nextIndex + size;
+ final int minimumByteCapacity = computeByteCapacity(minimumCapacity);
+ final int bytesToAdd = minimumByteCapacity - this.backingVector.length();
+ this.backingVector.alloc(bytesToAdd);
+ this.nextIndex += size;
+ return index;
+ }
+
+ /**
+ * Sets the capacity of this vector equal to its size, to that there is no
+ * unused capacity.
+ */
+ public void trimToSize() {
+ this.backingVector.trimToSize();
+ }
+
+ /**
+ * Returns the index of the first occurrence of a specified value in the vector.
+ * @param value The value whose index is sought.
+ * @param startingIndex The index in the vector at which the search should be started.
+ * @return The index to the first occurrence of {@code value} at or after {@code startingIndex}, or -1 if it does
+ * not occur in the vector.
+ */
+ public int indexOf(final byte value, final int startingIndex) {
+ validateInput(value);
+ for (int i = startingIndex; i < this.nextIndex; i++) {
+ if (this.get(i) == value) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Ensures that an input byte is in the correct range, throwing an
+ * {@link IllegalArgumentException} if it is not.
+ * @param inputByte The byte to be tested for suitability in a packed vector.
+ */
+ private void validateInput(final byte inputByte) {
+ if (inputByte < 0
+ || inputByte > WellKnownConstants.MAX_4_BIT_UNSIGNED_BYTE) {
+ throw new IllegalArgumentException("Expected val in the range 0x0 to 0xF: "
+ + inputByte);
+ }
+ }
+
+ @Override
+ public NibbleSequence subSequence(final int start, final int end) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public byte[] toArray() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NibblePrimitiveIterator iterator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NibblePrimitiveIterator iteratorReverse() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public int binarySearch(final byte value) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public int indexOf(final byte nibble) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean contains(final byte nibble) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public byte firstElement() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public byte lastElement() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isEmpty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public byte nibbleAt(final int index) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public NibbleSequencePlus asPlus() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NibbleSequenceMutable asMutable() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void swap(final int index1, final int index2) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void setLength(final int newLength) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void setNibbleAt(final int index, final byte newNibble) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void sort() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public NibbleSequenceMutable append(final byte newItem) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NibbleSequenceMutable append(final byte... newItems) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NibbleSequenceMutable append(final NibbleSequence sequence) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public NibbleSequenceMutable append(final NibbleSequence sequence, final int start, final int end) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public byte push(final byte newItem) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public byte pop() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public byte peek() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean empty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public NibbleSequencePlus toImmutable() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/NibbleArrayBuilderTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/NibbleArrayBuilderTests.java 2022-06-20 17:30:22 UTC (rev 12667)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/NibbleArrayBuilderTests.java 2022-06-20 18:32:41 UTC (rev 12668)
@@ -1,121 +0,0 @@
-/*
- * Copyright 2008 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.Arrays;
-
-/**
- * JUnit test class for the class {@link NibbleArrayBuilder}.
- */
-public class NibbleArrayBuilderTests {
-
- /** An array of test bytes. */
- private static byte[] testSequence01 = new byte[] {
- 0x0, 0x1, 0x2, 0x3,
- 0x4, 0x5, 0x6, 0x7,
- 0x8, 0x9, 0xA, 0xB,
- 0xC, 0xD, 0xE, 0xF,
- 0x1, 0xF, 0x2, 0xE
- };
-
- /**
- * Functional test of the class as a whole.
- */
- @Test
- public void testClass01() {
- final NibbleArrayBuilder testVector = new NibbleArrayBuilder();
-
- /* Put the content into a vector. */
- testVector.add(NibbleArrayBuilderTests.testSequence01);
- Assert.assertEquals(NibbleArrayBuilderTests.testSequence01.length, testVector.length());
- Assert.assertEquals(10, testVector.lengthInBytes());
-
- /* Get it back out again. */
- final byte[] actualContent = new byte[NibbleArrayBuilderTests.testSequence01.length];
- for (int i = 0; i < NibbleArrayBuilderTests.testSequence01.length; i++) {
- actualContent[i] = testVector.get(i);
- }
-
- Assert.assertTrue(Arrays.equals(NibbleArrayBuilderTests.testSequence01, actualContent));
- }
-
- /**
- * Test of {@link NibbleArrayBuilder#computeByteIndex(int)}.
- */
- @Test
- public void testComputeByteIndex() {
- final NibbleArrayBuilder testVector = new NibbleArrayBuilder();
-
- /* Index 0 & 1 should be in byte index 0. */
- Assert.assertEquals(0, testVector.computeByteIndex(0));
- Assert.assertEquals(0, testVector.computeByteIndex(1));
-
- /* Index 2 & 3 should be in byte index 1. */
- Assert.assertEquals(1, testVector.computeByteIndex(2));
- Assert.assertEquals(1, testVector.computeByteIndex(3));
-
- /* Index 4 & 5 should be in byte index 2. */
- Assert.assertEquals(2, testVector.computeByteIndex(4));
- Assert.assertEquals(2, testVector.computeByteIndex(5));
- }
-
- /**
- * Test of {@link NibbleArrayBuilder#indexOf(byte, int)}.
- */
- @Test
- public void testIndexOf() {
- final NibbleArrayBuilder testVector = new NibbleArrayBuilder();
- testVector.add(NibbleArrayBuilderTests.testSequence01);
-
- /* Straightforward search from the start. */
- int actualIndex = testVector.indexOf((byte) 0xF, 0);
- Assert.assertEquals(15, actualIndex);
-
- /* Start the search in a different place. The result should be the same. */
- actualIndex = testVector.indexOf((byte) 0xF, 7);
- Assert.assertEquals(15, actualIndex);
-
- /* Start the search on the first occurrence. The result should still be the same. */
- actualIndex = testVector.indexOf((byte) 0xF, 15);
- Assert.assertEquals(15, actualIndex);
-
- /* Now start the search just past the first occurrence. The second occurrence should be
- * returned. */
- actualIndex = testVector.indexOf((byte) 0xF, 16);
- Assert.assertEquals(17, actualIndex);
-
- /* Now test one that is not there. */
- actualIndex = testVector.indexOf((byte) 0x7, 16);
- Assert.assertEquals(-1, actualIndex);
- }
-
-}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/NibbleArrayBuilderTests.java (from rev 12650, trunk/foray/foray-common/src/test/java/org/foray/common/data/NibbleArrayBuilderTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/NibbleArrayBuilderTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/NibbleArrayBuilderTests.java 2022-06-20 18:32:41 UTC (rev 12668)
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2008 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.sequence;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+/**
+ * JUnit test class for the class {@link NibbleArrayBuilder}.
+ */
+public class NibbleArrayBuilderTests {
+
+ /** An array of test bytes. */
+ private static byte[] testSequence01 = new byte[] {
+ 0x0, 0x1, 0x2, 0x3,
+ 0x4, 0x5, 0x6, 0x7,
+ 0x8, 0x9, 0xA, 0xB,
+ 0xC, 0xD, 0xE, 0xF,
+ 0x1, 0xF, 0x2, 0xE
+ };
+
+ /**
+ * Functional test of the class as a whole.
+ */
+ @Test
+ public void testClass01() {
+ final NibbleArrayBuilder testVector = new NibbleArrayBuilder();
+
+ /* Put the content into a vector. */
+ testVector.add(NibbleArrayBuilderTests.testSequence01);
+ Assert.assertEquals(NibbleArrayBuilderTests.testSequence01.length, testVector.length());
+ Assert.assertEquals(10, testVector.lengthInBytes());
+
+ /* Get it back out again. */
+ final byte[] actualContent = new byte[NibbleArrayBuilderTests.testSequence01.length];
+ for (int i = 0; i < NibbleArrayBuilderTests.testSequence01.length; i++) {
+ actualContent[i] = testVector.get(i);
+ }
+
+ Assert.assertTrue(Arrays.equals(NibbleArrayBuilderTests.testSequence01, actualContent));
+ }
+
+ /**
+ * Test of {@link NibbleArrayBuilder#computeByteIndex(int)}.
+ */
+ @Test
+ public void testComputeByteIndex() {
+ final NibbleArrayBuilder testVector = new NibbleArrayBuilder();
+
+ /* Index 0 & 1 should be in byte index 0. */
+ Assert.assertEquals(0, testVector.computeByteIndex(0));
+ Assert.assertEquals(0, testVector.computeByteIndex(1));
+
+ /* Index 2 & 3 should be in byte index 1. */
+ Assert.assertEquals(1, testVector.computeByteIndex(2));
+ Assert.assertEquals(1, testVector.computeByteIndex(3));
+
+ /* Index 4 & 5 should be in byte index 2. */
+ Assert.assertEquals(2, testVector.computeByteIndex(4));
+ Assert.assertEquals(2, testVector.computeByteIndex(5));
+ }
+
+ /**
+ * Test of {@link NibbleArrayBuilder#indexOf(byte, int)}.
+ */
+ @Test
+ public void testIndexOf() {
+ final NibbleArrayBuilder testVector = new NibbleArrayBuilder();
+ testVector.add(NibbleArrayBuilderTests.testSequence01);
+
+ /* Straightforward search from the start. */
+ int actualIndex = testVector.indexOf((byte) 0xF, 0);
+ Assert.assertEquals(15, actualIndex);
+
+ /* Start the search in a different place. The result should be the same. */
+ actualIndex = testVector.indexOf((byte) 0xF, 7);
+ Assert.assertEquals(15, actualIndex);
+
+ /* Start the search on the first occurrence. The result should still be the same. */
+ actualIndex = testVector.indexOf((byte) 0xF, 15);
+ Assert.assertEquals(15, actualIndex);
+
+ /* Now start the search just past the first occurrence. The second occurrence should be
+ * returned. */
+ actualIndex = testVector.indexOf((byte) 0xF, 16);
+ Assert.assertEquals(17, actualIndex);
+
+ /* Now test one that is not there. */
+ actualIndex = testVector.indexOf((byte) 0x7, 16);
+ Assert.assertEquals(-1, actualIndex);
+ }
+
+}
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 17:30:22 UTC (rev 12667)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/PatternTree.java 2022-06-20 18:32:41 UTC (rev 12668)
@@ -33,10 +33,10 @@
package org.foray.orthography;
-import org.foray.common.data.NibbleArrayBuilder;
import org.foray.common.data.TernaryTree;
import org.foray.common.primitive.BitUtils;
import org.foray.common.primitive.StringUtils;
+import org.foray.common.sequence.NibbleArrayBuilder;
import org.axsl.orthography.OrthographyException;
@@ -151,16 +151,13 @@
}
/**
- * Packs the interletter values by storing each one of them in 4 bits, two
- * values into a byte, in big endian order, that is, the higher order byte
- * into the high order 4-bits, and storing these packed values in
+ * Packs the interletter values by storing each one of them in 4 bits, two values into a byte, in big endian order,
+ * that is, the higher order byte into the high order 4-bits, and storing these packed values in
* {@link #patternValues}.
- * @param values A string of digits from '0' to '9' representing the
- * interletter values.
- * @return The index into {@link #patternValues} where the packed values
- * are stored.
+ * @param values A string of digits from '0' to '9' representing the interletter values.
+ * @return The index into {@link #patternValues} where the packed values are stored.
*/
- private int packValues(final String values) {
+ private int packValues(final CharSequence values) {
final int start = this.patternValues.length();
for (int stringIndex = 0; stringIndex < values.length(); stringIndex++) {
/* Convert an ASCII numeral to its numeric value. For example, an ASCII numeral 0 (0x30)
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java 2022-06-20 17:30:22 UTC (rev 12667)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java 2022-06-20 18:32:41 UTC (rev 12668)
@@ -94,7 +94,7 @@
/**
* Tests of {@link PatternTree#hyphenate(CharSequence, int, int)} for a four-syllable word that <em>is</em> found in
- * the patterns, "hy-phen-a-tion".
+ * the patterns: "hy-phen-a-tion".
* @throws IOException For error creating hyphenation server.
* @throws OrthographyException For error getting the hyphenation tree.
*/
@@ -108,7 +108,7 @@
/**
* Tests of {@link PatternTree#hyphenate(CharSequence, int, int)} for a one-syllable word that <em>is</em> found in
- * the patterns "times". This word was chosen because it at one time returned a hyphenation point at position 0,
+ * the patterns: "times". This word was chosen because it at one time returned a hyphenation point at position 0,
* essentially suggesting that there was a discretionary hyphenation point at the very beginning of the word.
* @throws IOException For error creating hyphenation server.
* @throws OrthographyException For error getting the hyphenation tree.
@@ -120,4 +120,17 @@
Assert.assertNull(actual);
}
+ /**
+ * Tests of {@link PatternTree#hyphenate(CharSequence, int, int)} for a one-syllable word that <em>is</em> found in
+ * the patterns: "friends".
+ * @throws IOException For error creating hyphenation server.
+ * @throws OrthographyException For error getting the hyphenation tree.
+ */
+ @Test
+ public void hyphenateTest04() throws IOException, OrthographyException {
+ final String testString = "friends";
+ final StringWord actual = PatternTreeTests.patternTree.hyphenate(testString, 0, testString.length());
+ Assert.assertNull(actual);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 17:30:32
|
Revision: 12667
http://sourceforge.net/p/foray/code/12667
Author: victormote
Date: 2022-06-20 17:30:22 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Move tests of sequence classes to more correct package.
Added Paths:
-----------
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractByteSequenceTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractIntSequenceTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayBuilderTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntSequenceIteratorTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/LongArrayBuilderTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/LongArrayTests.java
Removed Paths:
-------------
trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractByteSequenceTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractIntSequenceTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayBuilderTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/IntSequenceIteratorTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayBuilderTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayTests.java
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractByteSequenceTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractByteSequenceTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractByteSequenceTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,257 +0,0 @@
-/*
- * Copyright 2020 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.AbstractByteSequence;
-import org.foray.common.sequence.ByteArray;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * JUnit tests of {@link AbstractByteSequence}.
- */
-public class AbstractByteSequenceTests {
-
- /** A test sequence. */
- private ByteArray test1 = new ByteArray("That's one small step for man.");
- /* 0 1 2 */
- /* 012345678901234567890123456789 */
-
- /** A test sequence.
- * 012345678901234567890123456789012345678*/
- private ByteArray test2 = new ByteArray("belly, jelly, smelly, bell, jell, smell.");
- /* 0 1 2 3 */
- /* 012345678901234567890123456789012345678 */
-
- /**
- * Tests of method {@link AbstractByteSequence#indexOf(int)}.
- */
- @Test
- public void testIndexOfInt() {
- /* Test one in the middle. */
- Assert.assertEquals(7, test1.indexOf('o'));
- /* Test first one. */
- Assert.assertEquals(0, test1.indexOf('T'));
- /* Test last one. */
- Assert.assertEquals(29, test1.indexOf('.'));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test1.indexOf('$'));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#indexOf(int, int)}.
- */
- @Test
- public void testIndexOfIntInt() {
- /* Test one in the middle. */
- Assert.assertEquals(13, test1.indexOf('a', 10));
- /* Test first one. */
- Assert.assertEquals(-1, test1.indexOf('T', 10));
- /* Test last one. */
- Assert.assertEquals(29, test1.indexOf('.', 10));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test1.indexOf('$', 10));
- /* Test with index too low. Should find the first one. */
- Assert.assertEquals(5, test1.indexOf('s', -1));
- /* Test with index too high.*/
- Assert.assertEquals(-1, test1.indexOf('s', 30));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#lastIndexOf(int)}.
- */
- @Test
- public void testLastIndexOfInt() {
- /* Test one in the middle. */
- Assert.assertEquals(23, test1.lastIndexOf('o'));
- /* Test first one. */
- Assert.assertEquals(0, test1.lastIndexOf('T'));
- /* Test last one. */
- Assert.assertEquals(29, test1.lastIndexOf('.'));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test1.lastIndexOf('$'));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#lastIndexOf(int, int)}.
- */
- @Test
- public void testLastIndexOfIntInt() {
- /* Test one in the middle. */
- Assert.assertEquals(2, test1.lastIndexOf('a', 10));
- /* Test first one. */
- Assert.assertEquals(0, test1.lastIndexOf('T', 10));
- /* Test last one. */
- Assert.assertEquals(-1, test1.lastIndexOf('.', 10));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test1.lastIndexOf('$', 10));
- /* Test with index too low. */
- Assert.assertEquals(-1, test1.lastIndexOf('s', -1));
- /* Test with index too high. Should find the last one. */
- Assert.assertEquals(17, test1.lastIndexOf('s', 30));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#indexOf(java.lang.CharSequence)}.
- */
- @Test
- public void testIndexOfCharSequence() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.indexOf("bell,"));
- /* Test first one. */
- Assert.assertEquals(0, test2.indexOf("bell"));
- /* Test last one. */
- Assert.assertEquals(34, test2.indexOf("smell."));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.indexOf("Colorado"));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#indexOf(java.lang.CharSequence, int)}.
- */
- @Test
- public void testIndexOfCharSequenceInt() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.indexOf("bell,", 10));
- /* Test first one. */
- Assert.assertEquals(-1, test2.indexOf("belly,", 10));
- /* Test last one. */
- Assert.assertEquals(16, test2.indexOf("ell", 10));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.indexOf("Colorado", 10));
- /* Test with index too low. Should find the first one. */
- Assert.assertEquals(7, test2.indexOf("jelly,", -1));
- /* Test with index too high. */
- Assert.assertEquals(-1, test2.indexOf("ell", 45));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.CharSequence)}.
- */
- @Test
- public void testLastIndexOfCharSequence() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.lastIndexOf("bell,"));
- /* Test first one. */
- Assert.assertEquals(0, test2.lastIndexOf("belly,"));
- /* Test last one. */
- Assert.assertEquals(34, test2.lastIndexOf("smell."));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.lastIndexOf("Colorado"));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.CharSequence, int)}.
- */
- @Test
- public void testLastIndexOfCharSequenceInt() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.lastIndexOf("bell,", 25));
- /* Test first one. */
- Assert.assertEquals(0, test2.lastIndexOf("belly,", 25));
- /* Test last one. */
- Assert.assertEquals(23, test2.lastIndexOf("ell", 25));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.lastIndexOf("Colorado", 25));
- /* Test with index too low. */
- Assert.assertEquals(-1, test2.lastIndexOf("jelly,", -1));
- /* Test with index too high. Should find the last one.*/
- Assert.assertEquals(36, test2.lastIndexOf("ell", 45));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#indexOf(java.lang.ByteSequence)}.
- */
- @Test
- public void testIndexOfByteSequence() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.indexOf(new ByteArray("bell,")));
- /* Test first one. */
- Assert.assertEquals(0, test2.indexOf(new ByteArray("bell")));
- /* Test last one. */
- Assert.assertEquals(34, test2.indexOf(new ByteArray("smell.")));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.indexOf(new ByteArray("Colorado")));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#indexOf(java.lang.ByteSequence, int)}.
- */
- @Test
- public void testIndexOfByteSequenceInt() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.indexOf(new ByteArray("bell,"), 10));
- /* Test first one. */
- Assert.assertEquals(-1, test2.indexOf(new ByteArray("belly,"), 10));
- /* Test last one. */
- Assert.assertEquals(16, test2.indexOf(new ByteArray("ell"), 10));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.indexOf(new ByteArray("Colorado"), 10));
- /* Test with index too low. Should find the first one. */
- Assert.assertEquals(7, test2.indexOf(new ByteArray("jelly,"), -1));
- /* Test with index too high. */
- Assert.assertEquals(-1, test2.indexOf(new ByteArray("ell"), 45));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.ByteSequence)}.
- */
- @Test
- public void testLastIndexOfByteSequence() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.lastIndexOf(new ByteArray("bell,")));
- /* Test first one. */
- Assert.assertEquals(0, test2.lastIndexOf(new ByteArray("belly,")));
- /* Test last one. */
- Assert.assertEquals(34, test2.lastIndexOf(new ByteArray("smell.")));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.lastIndexOf(new ByteArray("Colorado")));
- }
-
- /**
- * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.ByteSequence, int)}.
- */
- @Test
- public void testLastIndexOfByteSequenceInt() {
- /* Test one in the middle. */
- Assert.assertEquals(22, test2.lastIndexOf(new ByteArray("bell,"), 25));
- /* Test first one. */
- Assert.assertEquals(0, test2.lastIndexOf(new ByteArray("belly,"), 25));
- /* Test last one. */
- Assert.assertEquals(23, test2.lastIndexOf(new ByteArray("ell"), 25));
- /* Test one that isn't there. */
- Assert.assertEquals(-1, test2.lastIndexOf(new ByteArray("Colorado"), 25));
- /* Test with index too low. */
- Assert.assertEquals(-1, test2.lastIndexOf(new ByteArray("jelly,"), -1));
- /* Test with index too high. Should find the last one.*/
- Assert.assertEquals(36, test2.lastIndexOf(new ByteArray("ell"), 45));
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractIntSequenceTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractIntSequenceTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractIntSequenceTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,118 +0,0 @@
-/*
- * Copyright 2020 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.AbstractIntSequence;
-import org.foray.common.sequence.IntArray;
-import org.foray.common.sequence.IntArrayBuilder;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests for subclasses of {@link AbstractIntSequence}.
- */
-public class AbstractIntSequenceTests {
-
- /** Array builder available to all tests. */
- private IntArrayBuilder builder;
-
- /**
- * Test setup.
- */
- @Before
- public void before() {
- final IntArrayBuilder builder = new IntArrayBuilder();
- builder.append(48);
- builder.append(-2041191);
- builder.append(0);
- builder.append(Integer.MAX_VALUE);
- builder.append(211);
- builder.append(Integer.MIN_VALUE);
- this.builder = builder;
- }
-
- /**
- * Standard "indexOf" assertions.
- * @param out The object under test.
- */
- private void indexOfAssertions(final AbstractIntSequence out) {
- Assert.assertEquals(0, out.indexOf(48));
- Assert.assertEquals(1, out.indexOf(-2041191));
- Assert.assertEquals(2, out.indexOf(0));
- Assert.assertEquals(3, out.indexOf(Integer.MAX_VALUE));
- Assert.assertEquals(4, out.indexOf(211));
- Assert.assertEquals(5, out.indexOf(Integer.MIN_VALUE));
-
- Assert.assertEquals(-1, out.indexOf(-1));
- Assert.assertEquals(-1, out.indexOf(1));
- Assert.assertEquals(-1, out.indexOf(-600));
- Assert.assertEquals(-1, out.indexOf(Integer.MAX_VALUE - 1));
- Assert.assertEquals(-1, out.indexOf(600));
- Assert.assertEquals(-1, out.indexOf(Integer.MIN_VALUE + 1));
- }
-
- /**
- * Standard "contains" assertions.
- * @param out The object under test.
- */
- private void containsAssertions(final AbstractIntSequence out) {
- Assert.assertTrue(out.contains(48));
- Assert.assertTrue(out.contains(-2041191));
- Assert.assertTrue(out.contains(0));
- Assert.assertTrue(out.contains(Integer.MAX_VALUE));
- Assert.assertTrue(out.contains(211));
- Assert.assertTrue(out.contains(Integer.MIN_VALUE));
-
- Assert.assertFalse(out.contains(-1));
- Assert.assertFalse(out.contains(1));
- Assert.assertFalse(out.contains(-600));
- Assert.assertFalse(out.contains(Integer.MAX_VALUE - 1));
- Assert.assertFalse(out.contains(600));
- Assert.assertFalse(out.contains(Integer.MIN_VALUE + 1));
- }
-
- /** Test of method {@link AbstractIntSequence#indexOf(int)}. */
- @Test
- public void testIndexOf() {
- indexOfAssertions(this.builder);
-
- final IntArray array = this.builder.toIntArray();
- indexOfAssertions(array);
- }
-
- /** Test of method {@link AbstractIntSequence#contains(int)}. */
- @Test
- public void testContains() {
- containsAssertions(this.builder);
- containsAssertions(this.builder.toIntArray());
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayBuilderTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayBuilderTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayBuilderTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,103 +0,0 @@
-/*
- * Copyright 2021 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.ByteArray;
-import org.foray.common.sequence.ByteArrayBuilder;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@link ByteArrayBuilder}.
- * Note that test coverage for many of the read-only methods in {@link ByteArrayBuilder} can be found in
- * {@link AbstractByteSequenceTests}.
- * Tests in this class are mostly for methods that mutate an instance of the builder.
- */
-public class ByteArrayBuilderTests {
-
- /** A sequence of bytes for testing. */
- private ByteArray testBytes1 = new ByteArray("Some bytes.");
-
- /**
- * Test of {@link ByteArrayBuilder#setLength(int)}, where the new length is smaller.
- */
- @Test
- public void testSetLengthSmaller() {
- final ByteArrayBuilder out = new ByteArrayBuilder();
- out.append(testBytes1);
- Assert.assertEquals(11, out.length());
- final int capacityBefore = out.capacity();
-
- out.setLength(3);
- Assert.assertEquals(3, out.length());
- Assert.assertEquals(new ByteArray("Som"), out);
- Assert.assertEquals(capacityBefore, out.capacity());
- }
-
- /**
- * Test of {@link ByteArrayBuilder#setLength(int)}, where the new length is greater.
- */
- @Test
- public void testSetLengthGreater() {
- final ByteArrayBuilder out = new ByteArrayBuilder(12);
- out.append(testBytes1);
- Assert.assertEquals(11, out.length());
- Assert.assertEquals(12, out.capacity());
-
- out.setLength(14);
- Assert.assertEquals(14, out.length());
- Assert.assertEquals(testBytes1, out.subSequence(0, testBytes1.length()));
- Assert.assertEquals(0, out.byteAt(11));
- Assert.assertEquals(0, out.byteAt(12));
- Assert.assertEquals(0, out.byteAt(13));
- }
-
- /**
- * Test of {@link ByteArrayBuilder#clear()}.
- */
- @Test
- public void testClear() {
- final ByteArrayBuilder out = new ByteArrayBuilder(12);
- out.append(testBytes1);
- Assert.assertEquals(11, out.length());
- Assert.assertEquals(12, out.capacity());
-
- out.clear();
- Assert.assertEquals(0, out.length());
- Assert.assertEquals(12, out.capacity());
- try {
- out.byteAt(0);
- throw new IllegalStateException("IndexOutOfBoundsException expected.");
- } catch (final IndexOutOfBoundsException e) {
- /* This is the expected path. */
- }
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,57 +0,0 @@
-/*
- * Copyright 2020 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.ByteArray;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@link ByteArray}.
- */
-public class ByteArrayTests {
-
- /**
- * Test of {@link ByteArray#fromHexCharSequence(CharSequence)}.
- */
- @Test
- public void fromHexCharSequenceTests() {
- final String input = "4397CDCC3F8F94FD6C77A64F83E95278";
- final byte[] expected = new byte[] {
- (byte) 0x43, (byte) 0x97, (byte) 0xCD, (byte) 0xCC, (byte) 0x3F, (byte) 0x8F, (byte) 0x94, (byte) 0xFD,
- (byte) 0x6C, (byte) 0x77, (byte) 0xA6, (byte) 0x4F, (byte) 0x83, (byte) 0xE9, (byte) 0x52, (byte) 0x78};
-
- final byte[] actual = ByteArray.fromHexCharSequence(input).toArray();
-
- Assert.assertArrayEquals(expected, actual);
-
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,110 +0,0 @@
-/*
- * Copyright 2019 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.IntArray;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@link IntArray}.
- */
-public class IntArrayTests {
-
- /**
- * Test of method {@link IntArray#equals(Object)} where the comparison object is of the wrong type.
- */
- @SuppressWarnings("unlikely-arg-type")
- @Test
- public void testEqualsWrongType() {
- final int[] theArray = {4};
- final IntArray out = new IntArray(theArray);
- Assert.assertFalse(out.equals("abc"));
- }
-
- /**
- * Test of method {@link IntArray#equals(Object)} where the comparison object is null.
- */
- @Test
- public void testEqualsNull() {
- final int[] theArray = {4};
- final IntArray out = new IntArray(theArray);
- Assert.assertFalse(out.equals(null));
- }
-
- /**
- * Test of method {@link IntArray#equals(Object)} where the length of the comparison object is different.
- */
- @Test
- public void testEqualsDifferentLengths() {
- final int[] theArray = {4, 4};
- final IntArray out = new IntArray(theArray);
-
- final int[] comparisonArray1 = {4};
- final IntArray comparison1 = new IntArray(comparisonArray1);
- Assert.assertFalse(out.equals(comparison1));
-
- final int[] comparisonArray2 = {4, 4, 4};
- final IntArray comparison2 = new IntArray(comparisonArray2);
- Assert.assertFalse(out.equals(comparison2));
- }
-
- /**
- * Test of method {@link IntArray#equals(Object)} where the sequences are equal.
- */
- @Test
- public void testEqualsAreEquivalentCharSequenceEquivalent() {
- final int[] theArray = {989, 4, -10388};
- final IntArray out = new IntArray(theArray);
-
- final int[] comparisonArray = {989, 4, -10388};
- final IntArray comparison = new IntArray(comparisonArray);
- Assert.assertTrue(out.equals(comparison));
- }
-
- /**
- * Tests of method {@link IntArray#lastInt()}.
- */
- @Test
- public void testLastInt() {
- IntArray out = new IntArray(10, 11, 12);
- Assert.assertEquals(12, out.lastInt());
-
- /* Internal array is empty. */
- out = new IntArray();
- try {
- out.lastInt();
- Assert.fail("Should have thrown an ArrayIndexOutOfBoundsException here.");
- } catch (final ArrayIndexOutOfBoundsException e) {
- /* This is the expected case. */
- }
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/IntSequenceIteratorTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/IntSequenceIteratorTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/IntSequenceIteratorTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,103 +0,0 @@
-/*
- * Copyright 2020 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.IntArray;
-import org.foray.common.sequence.IntSequenceIterator;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.NoSuchElementException;
-
-/**
- * Tests of {@link IntSequenceIterator}.
- */
-public class IntSequenceIteratorTests {
-
- /** An array useful for testing the iterator. */
- private IntArray array1 = new IntArray(5, -5, 100, -100, Integer.MAX_VALUE, Integer.MIN_VALUE);
-
- /**
- * Test of {@link IntSequenceIterator#IntSequenceIterator(org.axsl.utility.sequence.IntSequence, false)}.
- */
- @Test
- public void testForwardIterator() {
- final IntSequenceIterator out = new IntSequenceIterator(array1);
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(5, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(-5, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(100, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(-100, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(Integer.MAX_VALUE, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(Integer.MIN_VALUE, out.nextInt());
-
- Assert.assertFalse(out.hasNext());
- try {
- out.nextInt();
- Assert.fail("NoSuchElementException expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected path. */
- }
- }
-
- /**
- * Test of {@link IntSequenceIterator#IntSequenceIterator(org.axsl.utility.sequence.IntSequence, false)}.
- */
- @Test
- public void testReverseIterator() {
- final IntSequenceIterator out = new IntSequenceIterator(array1, true);
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(Integer.MIN_VALUE, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(Integer.MAX_VALUE, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(-100, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(100, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(-5, out.nextInt());
- Assert.assertTrue(out.hasNext());
- Assert.assertEquals(5, out.nextInt());
-
- Assert.assertFalse(out.hasNext());
- try {
- out.nextInt();
- Assert.fail("NoSuchElementException expected here.");
- } catch (final NoSuchElementException e) {
- /* This is the expected path. */
- }
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayBuilderTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayBuilderTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayBuilderTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,106 +0,0 @@
-/*
- * Copyright 2019 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.LongArray;
-import org.foray.common.sequence.LongArrayBuilder;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@Link LongArrayBuilder}.
- */
-public class LongArrayBuilderTests {
-
- /**
- * Test of method {@link LongArrayBuilder#equals(Object)} where the comparison object is of the wrong type.
- */
- @SuppressWarnings("unlikely-arg-type")
- @Test
- public void testEqualsWrongType() {
- final LongArrayBuilder out = new LongArrayBuilder();
- out.append(4);
- Assert.assertFalse(out.equals("abc"));
- }
-
- /**
- * Test of method {@link LongArrayBuilder#equals(Object)} where the comparison object is null.
- */
- @Test
- public void testEqualsNull() {
- final LongArrayBuilder out = new LongArrayBuilder();
- out.append(4);
- Assert.assertFalse(out.equals(null));
- }
-
- /**
- * Test of method {@link LongArrayBuilder#equals(Object)} where the length of the comparison object is different.
- */
- @Test
- public void testEqualsDifferentLengths() {
- final LongArrayBuilder out = new LongArrayBuilder();
- out.append(4);
- out.append(4);
- LongArrayBuilder comparison = new LongArrayBuilder();
- comparison.append(4);
- Assert.assertFalse(out.equals(comparison));
- comparison = new LongArrayBuilder();
- comparison.append(4);
- comparison.append(4);
- comparison.append(4);
- Assert.assertFalse(out.equals(comparison));
- }
-
- /**
- * Test of method {@link LongArrayBuilder#equals(Object)} where the sequences are equal.
- */
- @Test
- public void testEqualsAreEquivalent() {
- final LongArrayBuilder out = new LongArrayBuilder();
- out.append(989);
- out.append(4);
- final LongArrayBuilder comparison = new LongArrayBuilder();
- comparison.append(989);
- comparison.append(4);
- Assert.assertTrue(out.equals(comparison));
- }
-
- /** Test of method {@link LongArrayBuilder#append(long...)}. */
- @Test
- public void testAppend() {
- final LongArrayBuilder out = new LongArrayBuilder();
- out.append(0);
- out.append(1);
- out.append(2, 3, 4, 5);
- final LongArray expected = new LongArray(new long[] {0, 1, 2, 3, 4, 5});
- Assert.assertEquals(expected, out.toImmutable());
- }
-
-}
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayTests.java 2022-06-20 17:25:03 UTC (rev 12666)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/LongArrayTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -1,110 +0,0 @@
-/*
- * Copyright 2019 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.LongArray;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@link LongArray}.
- */
-public class LongArrayTests {
-
- /**
- * Test of method {@link LongArray#equals(Object)} where the comparison object is of the wrong type.
- */
- @SuppressWarnings("unlikely-arg-type")
- @Test
- public void testEqualsWrongType() {
- final long[] theArray = {4};
- final LongArray out = new LongArray(theArray);
- Assert.assertFalse(out.equals("abc"));
- }
-
- /**
- * Test of method {@link LongArray#equals(Object)} where the comparison object is null.
- */
- @Test
- public void testEqualsNull() {
- final long[] theArray = {4};
- final LongArray out = new LongArray(theArray);
- Assert.assertFalse(out.equals(null));
- }
-
- /**
- * Test of method {@link LongArray#equals(Object)} where the length of the comparison object is different.
- */
- @Test
- public void testEqualsDifferentLengths() {
- final long[] theArray = {4, 4};
- final LongArray out = new LongArray(theArray);
-
- final long[] comparisonArray1 = {4};
- final LongArray comparison1 = new LongArray(comparisonArray1);
- Assert.assertFalse(out.equals(comparison1));
-
- final long[] comparisonArray2 = {4, 4, 4};
- final LongArray comparison2 = new LongArray(comparisonArray2);
- Assert.assertFalse(out.equals(comparison2));
- }
-
- /**
- * Test of method {@link LongArray#equals(Object)} where the sequences are equal.
- */
- @Test
- public void testEqualsAreEquivalent() {
- final long[] theArray = {989, 4, -10388};
- final LongArray out = new LongArray(theArray);
-
- final long[] comparisonArray = {989, 4, -10388};
- final LongArray comparison = new LongArray(comparisonArray);
- Assert.assertTrue(out.equals(comparison));
- }
-
- /**
- * Tests of method {@link LongArray#lastLong()}.
- */
- @Test
- public void testLastLong() {
- LongArray out = new LongArray(10, 11, 12);
- Assert.assertEquals(12, out.lastLong());
-
- /* Internal array is empty. */
- out = new LongArray();
- try {
- out.lastLong();
- Assert.fail("Should have thrown an ArrayIndexOutOfBoundsException here.");
- } catch (final ArrayIndexOutOfBoundsException e) {
- /* This is the expected case. */
- }
- }
-
-}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractByteSequenceTests.java (from rev 12650, trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractByteSequenceTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractByteSequenceTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractByteSequenceTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -0,0 +1,254 @@
+/*
+ * Copyright 2020 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.sequence;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * JUnit tests of {@link AbstractByteSequence}.
+ */
+public class AbstractByteSequenceTests {
+
+ /** A test sequence. */
+ private ByteArray test1 = new ByteArray("That's one small step for man.");
+ /* 0 1 2 */
+ /* 012345678901234567890123456789 */
+
+ /** A test sequence.
+ * 012345678901234567890123456789012345678*/
+ private ByteArray test2 = new ByteArray("belly, jelly, smelly, bell, jell, smell.");
+ /* 0 1 2 3 */
+ /* 012345678901234567890123456789012345678 */
+
+ /**
+ * Tests of method {@link AbstractByteSequence#indexOf(int)}.
+ */
+ @Test
+ public void testIndexOfInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(7, test1.indexOf('o'));
+ /* Test first one. */
+ Assert.assertEquals(0, test1.indexOf('T'));
+ /* Test last one. */
+ Assert.assertEquals(29, test1.indexOf('.'));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test1.indexOf('$'));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#indexOf(int, int)}.
+ */
+ @Test
+ public void testIndexOfIntInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(13, test1.indexOf('a', 10));
+ /* Test first one. */
+ Assert.assertEquals(-1, test1.indexOf('T', 10));
+ /* Test last one. */
+ Assert.assertEquals(29, test1.indexOf('.', 10));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test1.indexOf('$', 10));
+ /* Test with index too low. Should find the first one. */
+ Assert.assertEquals(5, test1.indexOf('s', -1));
+ /* Test with index too high.*/
+ Assert.assertEquals(-1, test1.indexOf('s', 30));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#lastIndexOf(int)}.
+ */
+ @Test
+ public void testLastIndexOfInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(23, test1.lastIndexOf('o'));
+ /* Test first one. */
+ Assert.assertEquals(0, test1.lastIndexOf('T'));
+ /* Test last one. */
+ Assert.assertEquals(29, test1.lastIndexOf('.'));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test1.lastIndexOf('$'));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#lastIndexOf(int, int)}.
+ */
+ @Test
+ public void testLastIndexOfIntInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(2, test1.lastIndexOf('a', 10));
+ /* Test first one. */
+ Assert.assertEquals(0, test1.lastIndexOf('T', 10));
+ /* Test last one. */
+ Assert.assertEquals(-1, test1.lastIndexOf('.', 10));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test1.lastIndexOf('$', 10));
+ /* Test with index too low. */
+ Assert.assertEquals(-1, test1.lastIndexOf('s', -1));
+ /* Test with index too high. Should find the last one. */
+ Assert.assertEquals(17, test1.lastIndexOf('s', 30));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#indexOf(java.lang.CharSequence)}.
+ */
+ @Test
+ public void testIndexOfCharSequence() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.indexOf("bell,"));
+ /* Test first one. */
+ Assert.assertEquals(0, test2.indexOf("bell"));
+ /* Test last one. */
+ Assert.assertEquals(34, test2.indexOf("smell."));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.indexOf("Colorado"));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#indexOf(java.lang.CharSequence, int)}.
+ */
+ @Test
+ public void testIndexOfCharSequenceInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.indexOf("bell,", 10));
+ /* Test first one. */
+ Assert.assertEquals(-1, test2.indexOf("belly,", 10));
+ /* Test last one. */
+ Assert.assertEquals(16, test2.indexOf("ell", 10));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.indexOf("Colorado", 10));
+ /* Test with index too low. Should find the first one. */
+ Assert.assertEquals(7, test2.indexOf("jelly,", -1));
+ /* Test with index too high. */
+ Assert.assertEquals(-1, test2.indexOf("ell", 45));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.CharSequence)}.
+ */
+ @Test
+ public void testLastIndexOfCharSequence() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.lastIndexOf("bell,"));
+ /* Test first one. */
+ Assert.assertEquals(0, test2.lastIndexOf("belly,"));
+ /* Test last one. */
+ Assert.assertEquals(34, test2.lastIndexOf("smell."));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.lastIndexOf("Colorado"));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.CharSequence, int)}.
+ */
+ @Test
+ public void testLastIndexOfCharSequenceInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.lastIndexOf("bell,", 25));
+ /* Test first one. */
+ Assert.assertEquals(0, test2.lastIndexOf("belly,", 25));
+ /* Test last one. */
+ Assert.assertEquals(23, test2.lastIndexOf("ell", 25));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.lastIndexOf("Colorado", 25));
+ /* Test with index too low. */
+ Assert.assertEquals(-1, test2.lastIndexOf("jelly,", -1));
+ /* Test with index too high. Should find the last one.*/
+ Assert.assertEquals(36, test2.lastIndexOf("ell", 45));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#indexOf(java.lang.ByteSequence)}.
+ */
+ @Test
+ public void testIndexOfByteSequence() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.indexOf(new ByteArray("bell,")));
+ /* Test first one. */
+ Assert.assertEquals(0, test2.indexOf(new ByteArray("bell")));
+ /* Test last one. */
+ Assert.assertEquals(34, test2.indexOf(new ByteArray("smell.")));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.indexOf(new ByteArray("Colorado")));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#indexOf(java.lang.ByteSequence, int)}.
+ */
+ @Test
+ public void testIndexOfByteSequenceInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.indexOf(new ByteArray("bell,"), 10));
+ /* Test first one. */
+ Assert.assertEquals(-1, test2.indexOf(new ByteArray("belly,"), 10));
+ /* Test last one. */
+ Assert.assertEquals(16, test2.indexOf(new ByteArray("ell"), 10));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.indexOf(new ByteArray("Colorado"), 10));
+ /* Test with index too low. Should find the first one. */
+ Assert.assertEquals(7, test2.indexOf(new ByteArray("jelly,"), -1));
+ /* Test with index too high. */
+ Assert.assertEquals(-1, test2.indexOf(new ByteArray("ell"), 45));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.ByteSequence)}.
+ */
+ @Test
+ public void testLastIndexOfByteSequence() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.lastIndexOf(new ByteArray("bell,")));
+ /* Test first one. */
+ Assert.assertEquals(0, test2.lastIndexOf(new ByteArray("belly,")));
+ /* Test last one. */
+ Assert.assertEquals(34, test2.lastIndexOf(new ByteArray("smell.")));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.lastIndexOf(new ByteArray("Colorado")));
+ }
+
+ /**
+ * Tests of method {@link AbstractByteSequence#lastIndexOf(java.lang.ByteSequence, int)}.
+ */
+ @Test
+ public void testLastIndexOfByteSequenceInt() {
+ /* Test one in the middle. */
+ Assert.assertEquals(22, test2.lastIndexOf(new ByteArray("bell,"), 25));
+ /* Test first one. */
+ Assert.assertEquals(0, test2.lastIndexOf(new ByteArray("belly,"), 25));
+ /* Test last one. */
+ Assert.assertEquals(23, test2.lastIndexOf(new ByteArray("ell"), 25));
+ /* Test one that isn't there. */
+ Assert.assertEquals(-1, test2.lastIndexOf(new ByteArray("Colorado"), 25));
+ /* Test with index too low. */
+ Assert.assertEquals(-1, test2.lastIndexOf(new ByteArray("jelly,"), -1));
+ /* Test with index too high. Should find the last one.*/
+ Assert.assertEquals(36, test2.lastIndexOf(new ByteArray("ell"), 45));
+ }
+
+}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractIntSequenceTests.java (from rev 12650, trunk/foray/foray-common/src/test/java/org/foray/common/data/AbstractIntSequenceTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractIntSequenceTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/AbstractIntSequenceTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2020 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.sequence;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests for subclasses of {@link AbstractIntSequence}.
+ */
+public class AbstractIntSequenceTests {
+
+ /** Array builder available to all tests. */
+ private IntArrayBuilder builder;
+
+ /**
+ * Test setup.
+ */
+ @Before
+ public void before() {
+ final IntArrayBuilder builder = new IntArrayBuilder();
+ builder.append(48);
+ builder.append(-2041191);
+ builder.append(0);
+ builder.append(Integer.MAX_VALUE);
+ builder.append(211);
+ builder.append(Integer.MIN_VALUE);
+ this.builder = builder;
+ }
+
+ /**
+ * Standard "indexOf" assertions.
+ * @param out The object under test.
+ */
+ private void indexOfAssertions(final AbstractIntSequence out) {
+ Assert.assertEquals(0, out.indexOf(48));
+ Assert.assertEquals(1, out.indexOf(-2041191));
+ Assert.assertEquals(2, out.indexOf(0));
+ Assert.assertEquals(3, out.indexOf(Integer.MAX_VALUE));
+ Assert.assertEquals(4, out.indexOf(211));
+ Assert.assertEquals(5, out.indexOf(Integer.MIN_VALUE));
+
+ Assert.assertEquals(-1, out.indexOf(-1));
+ Assert.assertEquals(-1, out.indexOf(1));
+ Assert.assertEquals(-1, out.indexOf(-600));
+ Assert.assertEquals(-1, out.indexOf(Integer.MAX_VALUE - 1));
+ Assert.assertEquals(-1, out.indexOf(600));
+ Assert.assertEquals(-1, out.indexOf(Integer.MIN_VALUE + 1));
+ }
+
+ /**
+ * Standard "contains" assertions.
+ * @param out The object under test.
+ */
+ private void containsAssertions(final AbstractIntSequence out) {
+ Assert.assertTrue(out.contains(48));
+ Assert.assertTrue(out.contains(-2041191));
+ Assert.assertTrue(out.contains(0));
+ Assert.assertTrue(out.contains(Integer.MAX_VALUE));
+ Assert.assertTrue(out.contains(211));
+ Assert.assertTrue(out.contains(Integer.MIN_VALUE));
+
+ Assert.assertFalse(out.contains(-1));
+ Assert.assertFalse(out.contains(1));
+ Assert.assertFalse(out.contains(-600));
+ Assert.assertFalse(out.contains(Integer.MAX_VALUE - 1));
+ Assert.assertFalse(out.contains(600));
+ Assert.assertFalse(out.contains(Integer.MIN_VALUE + 1));
+ }
+
+ /** Test of method {@link AbstractIntSequence#indexOf(int)}. */
+ @Test
+ public void testIndexOf() {
+ indexOfAssertions(this.builder);
+
+ final IntArray array = this.builder.toIntArray();
+ indexOfAssertions(array);
+ }
+
+ /** Test of method {@link AbstractIntSequence#contains(int)}. */
+ @Test
+ public void testContains() {
+ containsAssertions(this.builder);
+ containsAssertions(this.builder.toIntArray());
+ }
+
+}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayBuilderTests.java (from rev 12650, trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayBuilderTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayBuilderTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayBuilderTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2021 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.sequence;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests of {@link ByteArrayBuilder}.
+ * Note that test coverage for many of the read-only methods in {@link ByteArrayBuilder} can be found in
+ * {@link AbstractByteSequenceTests}.
+ * Tests in this class are mostly for methods that mutate an instance of the builder.
+ */
+public class ByteArrayBuilderTests {
+
+ /** A sequence of bytes for testing. */
+ private ByteArray testBytes1 = new ByteArray("Some bytes.");
+
+ /**
+ * Test of {@link ByteArrayBuilder#setLength(int)}, where the new length is smaller.
+ */
+ @Test
+ public void testSetLengthSmaller() {
+ final ByteArrayBuilder out = new ByteArrayBuilder();
+ out.append(testBytes1);
+ Assert.assertEquals(11, out.length());
+ final int capacityBefore = out.capacity();
+
+ out.setLength(3);
+ Assert.assertEquals(3, out.length());
+ Assert.assertEquals(new ByteArray("Som"), out);
+ Assert.assertEquals(capacityBefore, out.capacity());
+ }
+
+ /**
+ * Test of {@link ByteArrayBuilder#setLength(int)}, where the new length is greater.
+ */
+ @Test
+ public void testSetLengthGreater() {
+ final ByteArrayBuilder out = new ByteArrayBuilder(12);
+ out.append(testBytes1);
+ Assert.assertEquals(11, out.length());
+ Assert.assertEquals(12, out.capacity());
+
+ out.setLength(14);
+ Assert.assertEquals(14, out.length());
+ Assert.assertEquals(testBytes1, out.subSequence(0, testBytes1.length()));
+ Assert.assertEquals(0, out.byteAt(11));
+ Assert.assertEquals(0, out.byteAt(12));
+ Assert.assertEquals(0, out.byteAt(13));
+ }
+
+ /**
+ * Test of {@link ByteArrayBuilder#clear()}.
+ */
+ @Test
+ public void testClear() {
+ final ByteArrayBuilder out = new ByteArrayBuilder(12);
+ out.append(testBytes1);
+ Assert.assertEquals(11, out.length());
+ Assert.assertEquals(12, out.capacity());
+
+ out.clear();
+ Assert.assertEquals(0, out.length());
+ Assert.assertEquals(12, out.capacity());
+ try {
+ out.byteAt(0);
+ throw new IllegalStateException("IndexOutOfBoundsException expected.");
+ } catch (final IndexOutOfBoundsException e) {
+ /* This is the expected path. */
+ }
+ }
+
+}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayTests.java (from rev 12650, trunk/foray/foray-common/src/test/java/org/foray/common/data/ByteArrayTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/ByteArrayTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2020 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.sequence;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests of {@link ByteArray}.
+ */
+public class ByteArrayTests {
+
+ /**
+ * Test of {@link ByteArray#fromHexCharSequence(CharSequence)}.
+ */
+ @Test
+ public void fromHexCharSequenceTests() {
+ final String input = "4397CDCC3F8F94FD6C77A64F83E95278";
+ final byte[] expected = new byte[] {
+ (byte) 0x43, (byte) 0x97, (byte) 0xCD, (byte) 0xCC, (byte) 0x3F, (byte) 0x8F, (byte) 0x94, (byte) 0xFD,
+ (byte) 0x6C, (byte) 0x77, (byte) 0xA6, (byte) 0x4F, (byte) 0x83, (byte) 0xE9, (byte) 0x52, (byte) 0x78};
+
+ final byte[] actual = ByteArray.fromHexCharSequence(input).toArray();
+
+ Assert.assertArrayEquals(expected, actual);
+
+ }
+
+}
Copied: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayTests.java (from rev 12650, trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayTests.java)
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayTests.java 2022-06-20 17:30:22 UTC (rev 12667)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2019 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific...
[truncated message content] |
|
From: <vic...@us...> - 2022-06-20 17:25:06
|
Revision: 12666
http://sourceforge.net/p/foray/code/12666
Author: victormote
Date: 2022-06-20 17:25:03 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Combine two IntArrayBuilderTests classes.
Modified Paths:
--------------
trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayBuilderTests.java
Removed Paths:
-------------
trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayBuilderTests.java
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayBuilderTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayBuilderTests.java 2022-06-20 12:25:31 UTC (rev 12665)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/data/IntArrayBuilderTests.java 2022-06-20 17:25:03 UTC (rev 12666)
@@ -1,106 +0,0 @@
-/*
- * Copyright 2019 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.data;
-
-import org.foray.common.sequence.IntArray;
-import org.foray.common.sequence.IntArrayBuilder;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@Link IntArrayBuilder}.
- */
-public class IntArrayBuilderTests {
-
- /**
- * Test of method {@link IntArrayBuilder#equals(Object)} where the comparison object is of the wrong type.
- */
- @SuppressWarnings("unlikely-arg-type")
- @Test
- public void testEqualsWrongType() {
- final IntArrayBuilder out = new IntArrayBuilder();
- out.append(4);
- Assert.assertFalse(out.equals("abc"));
- }
-
- /**
- * Test of method {@link IntArrayBuilder#equals(Object)} where the comparison object is null.
- */
- @Test
- public void testEqualsNull() {
- final IntArrayBuilder out = new IntArrayBuilder();
- out.append(4);
- Assert.assertFalse(out.equals(null));
- }
-
- /**
- * Test of method {@link IntArrayBuilder#equals(Object)} where the length of the comparison object is different.
- */
- @Test
- public void testEqualsDifferentLengths() {
- final IntArrayBuilder out = new IntArrayBuilder();
- out.append(4);
- out.append(4);
- IntArrayBuilder comparison = new IntArrayBuilder();
- comparison.append(4);
- Assert.assertFalse(out.equals(comparison));
- comparison = new IntArrayBuilder();
- comparison.append(4);
- comparison.append(4);
- comparison.append(4);
- Assert.assertFalse(out.equals(comparison));
- }
-
- /**
- * Test of method {@link IntArrayBuilder#equals(Object)} where the sequences are equal.
- */
- @Test
- public void testEqualsAreEquivalentCharSequenceEquivalent() {
- final IntArrayBuilder out = new IntArrayBuilder();
- out.append(989);
- out.append(4);
- final IntArrayBuilder comparison = new IntArrayBuilder();
- comparison.append(989);
- comparison.append(4);
- Assert.assertTrue(out.equals(comparison));
- }
-
- /** Test of method {@link IntArrayBuilder#append(int...)}. */
- @Test
- public void testAppend() {
- final IntArrayBuilder out = new IntArrayBuilder();
- out.append(0);
- out.append(1);
- out.append(2, 3, 4, 5);
- final IntArray expected = new IntArray(new int[] {0, 1, 2, 3, 4, 5});
- Assert.assertEquals(expected, out.toIntArray());
- }
-
-}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayBuilderTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayBuilderTests.java 2022-06-20 12:25:31 UTC (rev 12665)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/sequence/IntArrayBuilderTests.java 2022-06-20 17:25:03 UTC (rev 12666)
@@ -37,6 +37,70 @@
public class IntArrayBuilderTests {
/**
+ * Test of method {@link IntArrayBuilder#equals(Object)} where the comparison object is of the wrong type.
+ */
+ @SuppressWarnings("unlikely-arg-type")
+ @Test
+ public void testEqualsWrongType() {
+ final IntArrayBuilder out = new IntArrayBuilder();
+ out.append(4);
+ Assert.assertFalse(out.equals("abc"));
+ }
+
+ /**
+ * Test of method {@link IntArrayBuilder#equals(Object)} where the comparison object is null.
+ */
+ @Test
+ public void testEqualsNull() {
+ final IntArrayBuilder out = new IntArrayBuilder();
+ out.append(4);
+ Assert.assertFalse(out.equals(null));
+ }
+
+ /**
+ * Test of method {@link IntArrayBuilder#equals(Object)} where the length of the comparison object is different.
+ */
+ @Test
+ public void testEqualsDifferentLengths() {
+ final IntArrayBuilder out = new IntArrayBuilder();
+ out.append(4);
+ out.append(4);
+ IntArrayBuilder comparison = new IntArrayBuilder();
+ comparison.append(4);
+ Assert.assertFalse(out.equals(comparison));
+ comparison = new IntArrayBuilder();
+ comparison.append(4);
+ comparison.append(4);
+ comparison.append(4);
+ Assert.assertFalse(out.equals(comparison));
+ }
+
+ /**
+ * Test of method {@link IntArrayBuilder#equals(Object)} where the sequences are equal.
+ */
+ @Test
+ public void testEqualsAreEquivalentCharSequenceEquivalent() {
+ final IntArrayBuilder out = new IntArrayBuilder();
+ out.append(989);
+ out.append(4);
+ final IntArrayBuilder comparison = new IntArrayBuilder();
+ comparison.append(989);
+ comparison.append(4);
+ Assert.assertTrue(out.equals(comparison));
+ }
+
+ /** Test of method {@link IntArrayBuilder#append(int...)}. */
+ @Test
+ public void testAppend() {
+ final IntArrayBuilder out = new IntArrayBuilder();
+ out.append(0);
+ out.append(1);
+ out.append(2, 3, 4, 5);
+ final IntArray expected = new IntArray(new int[] {0, 1, 2, 3, 4, 5});
+ Assert.assertEquals(expected, out.toIntArray());
+ }
+
+ /**
* Test of {@link IntArrayBuilder#insert(int, int)}.
*/
@Test
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-20 12:25:34
|
Revision: 12665
http://sourceforge.net/p/foray/code/12665
Author: victormote
Date: 2022-06-20 12:25:31 +0000 (Mon, 20 Jun 2022)
Log Message:
-----------
Rename test classes for clarity.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/NaturalLanguageTests.java
Added Paths:
-----------
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/OrthographyServer4aTests.java
Removed Paths:
-------------
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java
trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationServer4aTests.java
Deleted: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java 2022-06-19 16:16:53 UTC (rev 12664)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java 2022-06-20 12:25:31 UTC (rev 12665)
@@ -1,221 +0,0 @@
-/*
- * Copyright 2017 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.orthography;
-
-import org.foray.common.i18n.WritingSystem4a;
-
-import org.axsl.orthography.OrthographyException;
-import org.axsl.orthography.Word;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import java.io.IOException;
-
-/**
- * Tests of {@link HyphenationConsumer4a}.
- */
-public class HyphenationConsumer4aTests {
-
- /** The hyphenation server used in these tests. */
- private static OrthographyServer4a server;
-
- /** The object under test. */
- private Orthography4a consumer;
-
-
- /**
- * Setup resources used over all tests in this class.
- * @throws IOException For errors during server creation.
- * @throws OrthographyException For errors creating the hyphenation server.
- */
- @BeforeClass
- public static void beforeClass() throws IOException, OrthographyException {
- final OrthographyServerConfig config = HyphenationServer4aTests.makeHyphenationServerConfig();
- server = new OrthographyServer4a(config);
- Assert.assertNotNull(server);
- }
-
- /**
- * Setup the test.
- */
- @Before
- public void before() {
- this.consumer = server.getOrthography(WritingSystem4a.USA);
- }
-
- /**
- * Test of {@link HyphenationConsumer4a#parseWordSequence(CharSequence, int, int, ParaConfig)}.
- * @throws OrthographyException Not expected here.
- */
- @Test
- public void parseWordSequenceTest() throws OrthographyException {
- /* Spoken by Henry, Henry V, Act III Scene 1. */
- final String testString = "Once more unto the breach, dear friends, once more;";
- final TokenFlow4a wordSequence =
- this.consumer.tokenize(testString, 0, testString.length());
- Assert.assertEquals(20, wordSequence.qtyTokens());
- Assert.assertEquals("Once", wordSequence.tokenAt(0).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(1).toString());
- Assert.assertEquals("more", wordSequence.tokenAt(2).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(3).toString());
- Assert.assertEquals("un-to", wordSequence.tokenAt(4).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(5).toString());
- Assert.assertEquals("the", wordSequence.tokenAt(6).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(7).toString());
- Assert.assertEquals("breach", wordSequence.tokenAt(8).toString());
- Assert.assertEquals(",", wordSequence.tokenAt(9).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(10).toString());
- Assert.assertEquals("dear", wordSequence.tokenAt(11).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(12).toString());
- Assert.assertEquals("friends", wordSequence.tokenAt(13).toString());
- Assert.assertEquals(",", wordSequence.tokenAt(14).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(15).toString());
- Assert.assertEquals("once", wordSequence.tokenAt(16).toString());
- Assert.assertEquals(" ", wordSequence.tokenAt(17).toString());
- Assert.assertEquals("more", wordSequence.tokenAt(18).toString());
- Assert.assertEquals(";", wordSequence.tokenAt(19).toString());
- }
-
- /**
- * Tests the English word "hyphenation".
- * An English dictionary hyphenates this "hy-phen-a-tion".
- * @throws OrthographyException For processing errors during hyphenation.
- */
- @Test
- public void testEnHyphenation() throws OrthographyException {
- enHyphenation("hyphenation");
- }
-
- /**
- * Tests the English word "HyphenAtion".
- * This is the same test as {@link #testEnHyphenation()} except some uppercase characters are thrown into the word
- * to test whether such cases are handled properly, that is, whether "hyphenation" and "HyphenAtion" are hyphenated
- * identically, which they should be.
- * @throws OrthographyException For processing errors during hyphenation.
- */
- @Test
- public void testEnHyphenationUpper() throws OrthographyException {
- enHyphenation("HyphenAtion");
- }
-
- /**
- * The actual test for {@link #testEnHyphenation()} and {@link #testEnHyphenationUpper()}.
- * @param testWord The actual input word being tested, which should be some variant of "hyphenation".
- * @throws OrthographyException For processing errors during hyphenation.
- */
- public final void enHyphenation(final String testWord)
- throws OrthographyException {
- if (! testWord.toLowerCase().equals("hyphenation")) {
- throw new OrthographyException("Test of \"hyphenation\" has invalid input.");
- }
- final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
- final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
- Assert.assertNotNull(hyphenation);
- Assert.assertEquals(3, hyphenation.qtyHyphenationPoints());
- Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
- Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(1));
- Assert.assertEquals(7, hyphenation.hyphenationPointOffsetAt(2));
- }
-
- /**
- * Tests the English word "obligatory".
- * An English dictionary hyphenates this "ob-lig-a-to-ry".
- * @throws OrthographyException For processing errors during hyphenation.
- */
- @Test
- public void testEnObligatory() throws OrthographyException {
- enObligatory("obligatory");
- }
-
- /**
- * Tests the English word "ObliGatorY".
- * This is the same test as {@link #testEnObligatory()} except some uppercase characters are thrown into the word to
- * test whether such cases are handled properly, that is, whether "obligatory" and "ObliGatorY" are hyphenated
- * identically, which they should be.
- * @throws OrthographyException For processing errors during hyphenation.
- */
- @Test
- public void testEnObligatoryUpper() throws OrthographyException {
- enObligatory("ObliGatorY");
- }
-
- /**
- * The actual test for {@link #testEnObligatory()} and {@link #testEnObligatoryUpper()}.
- * @param testWord The actual input word being tested, which should be some variant of "obligatory".
- * @throws OrthographyException For processing errors during hyphenation.
- */
- public final void enObligatory(final String testWord)
- throws OrthographyException {
- if (! testWord.toLowerCase().equals("obligatory")) {
- throw new OrthographyException("Test of \"obligatory\" has invalid input.");
- }
- final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
- final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
- Assert.assertNotNull(hyphenation);
- Assert.assertEquals(4, hyphenation.qtyHyphenationPoints());
- Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
- Assert.assertEquals(5, hyphenation.hyphenationPointOffsetAt(1));
- Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(2));
- Assert.assertEquals(8, hyphenation.hyphenationPointOffsetAt(3));
- }
-
- /**
- * Tests the English psuedo-word "table8" to ensure that a null hyphenation is returned.
- * Null should be returned, because the character "8" is not included in any hyphenation character class for the
- * English language.
- * @throws OrthographyException For processing errors during hyphenation.
- */
- @Test
- public void testEnInvalidCharacter() throws OrthographyException {
- final String testWord = "table8";
- final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
- final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
- Assert.assertNull(hyphenation);
- }
-
- /**
- * Test of a derived word, "times", which does not appear in the dictionary, while the base word "time" does
- * appear.
- * @throws OrthographyException For processing errors during hyphenation.
- */
- @Test
- public void testTimes() throws OrthographyException {
- final String testWord = "times";
- final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
- final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
- Assert.assertNotNull(hyphenation);
- Assert.assertEquals("times", hyphenation.toString());
- Assert.assertEquals("time", hyphenation.getNormalizedContent());
- Assert.assertEquals("times", hyphenation.getActualContent());
- }
-
-}
Deleted: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationServer4aTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationServer4aTests.java 2022-06-19 16:16:53 UTC (rev 12664)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationServer4aTests.java 2022-06-20 12:25:31 UTC (rev 12665)
@@ -1,175 +0,0 @@
-/*
- * Copyright 2007 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.orthography;
-
-import org.foray.common.Environment;
-import org.foray.common.i18n.Language4a;
-import org.foray.common.i18n.WritingSystem4a;
-
-import org.axsl.orthography.OrthographyException;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Properties;
-
-/**
- * Tests of {@link OrthographyServer4a}.
- */
-public class HyphenationServer4aTests {
-
- /** The object under test. */
- private OrthographyServer4a out;
-
- /**
- * Set up the tests.
- * @throws OrthographyException For errors during setup.
- * @throws IOException For errors reading config files.
- */
- @Before
- public final void setUp() throws OrthographyException, IOException {
- this.out = makeHyphenationServer();
- Assert.assertNotNull(this.out);
- }
-
- /**
- * Returns a hyphenation server config that can be used by hyphenation tests.
- * @return A hyphenation server config that can be used by hyphenation tests.
- * @throws IOException For errors retrieving the environment, or creating the URLs.
- */
- public static OrthographyServerConfig makeHyphenationServerConfig() throws IOException {
- final Properties buildProperties = Environment.getBuildProperties();
- final String foraySandbox = buildProperties.getProperty("foray.sandbox");
-
- final String orthographyConfigPath = foraySandbox
- + "/foray-orthography/src/test/resources/orthography-config.xml";
- final String rawDictionaryPath = foraySandbox + "/foray-orthography/src/main/data/dictionaries/";
- final String parsedDictionaryPath =
- foraySandbox + "/foray-orthography/src/main/resources/resources/org/foray/orthography/dictionaries/";
- final String rawPatternsPath = foraySandbox + "/foray-orthography/src/main/data/hyph-patterns";
- final String parsedPatternsPath =
- foraySandbox + "/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/";
- final String naturalLanguagePath = foraySandbox + "/foray-orthography/src/main/data/natural-languages/";
-
- final URL orthographyFile = new URL("file", null, orthographyConfigPath);
- final URL rawDictionary = new URL("file", null, rawDictionaryPath);
- final URL parsedDictionary = new URL("file", null, parsedDictionaryPath);
- final URL rawPatterns = new URL("file", null, rawPatternsPath);
- final URL parsedPatterns = new URL("file", null, parsedPatternsPath);
- final URL naturalLanguage = new URL("file", null, naturalLanguagePath);
-
- final OrthographyServerConfig config = new OrthographyServerConfig();
- config.setOrthographyConfigurationLocation(orthographyFile);
- config.setWordListsBaseDirectory(rawDictionary);
- config.setSerializedDictionariesBaseDirectory(parsedDictionary);
- config.setRawHyphenationPatternsBaseDirectory(rawPatterns);
- config.setSerializedHyphenationPatternsBaseDirectory(parsedPatterns);
- config.setNaturalLanguagesBaseDirectory(naturalLanguage);
- return config;
- }
-
- /**
- * Creates an instance of {@link OrthographyServer4a}.
- * @return The newly-created instance.
- * @throws IOException For any errors creating the instance.
- * @throws OrthographyException For errors creating a hyphenation server.
- */
- public static OrthographyServer4a makeHyphenationServer() throws IOException, OrthographyException {
- final OrthographyServerConfig config = makeHyphenationServerConfig();
- return new OrthographyServer4a(config);
- }
-
- /**
- * Make sure that the resource files that are supposed to be available actually are.
- * @throws OrthographyException For errors obtaining the various tree instances.
- */
- @Test
- public void testResources() throws OrthographyException {
- /* Using this variable for the expected source makes switching back and forth during testing easier. */
- final PatternTree.Source expectedSource = PatternTree.Source.RESOURCES;
-
- /* English, U.S. */
- WritingSystem4a writingSystem = WritingSystem4a.USA;
- PatternTree tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Finnish. */
- writingSystem = WritingSystem4a.FINLAND;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Hungarian. */
- writingSystem = WritingSystem4a.HUNGARY;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Italian. */
- writingSystem = WritingSystem4a.ITALY;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Polish. */
- writingSystem = WritingSystem4a.POLAND;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Portuguese. */
- writingSystem = WritingSystem4a.PORTUGAL;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Russian. */
- writingSystem = WritingSystem4a.RUSSIA;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Spanish. */
- writingSystem = WritingSystem4a.SPAIN;
- tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
- Assert.assertNotNull(tree);
- Assert.assertEquals(expectedSource, tree.getSource());
-
- /* Try one that we know we don't have, Klingon. */
- final Language4a language = Language4a.findFromAlpha("tlh");
- writingSystem = WritingSystem4a.find(language, null, null);
- /* We have not configured an orthography. */
- Assert.assertNull(this.out.getOrthography(writingSystem));
- }
-
-}
Copied: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java (from rev 12650, trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationConsumer4aTests.java)
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java (rev 0)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/Orthography4aTests.java 2022-06-20 12:25:31 UTC (rev 12665)
@@ -0,0 +1,221 @@
+/*
+ * Copyright 2017 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.orthography;
+
+import org.foray.common.i18n.WritingSystem4a;
+
+import org.axsl.orthography.OrthographyException;
+import org.axsl.orthography.Word;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * Tests of {@link Orthography4a}.
+ */
+public class Orthography4aTests {
+
+ /** The hyphenation server used in these tests. */
+ private static OrthographyServer4a server;
+
+ /** The object under test. */
+ private Orthography4a consumer;
+
+
+ /**
+ * Setup resources used over all tests in this class.
+ * @throws IOException For errors during server creation.
+ * @throws OrthographyException For errors creating the hyphenation server.
+ */
+ @BeforeClass
+ public static void beforeClass() throws IOException, OrthographyException {
+ final OrthographyServerConfig config = OrthographyServer4aTests.makeHyphenationServerConfig();
+ server = new OrthographyServer4a(config);
+ Assert.assertNotNull(server);
+ }
+
+ /**
+ * Setup the test.
+ */
+ @Before
+ public void before() {
+ this.consumer = server.getOrthography(WritingSystem4a.USA);
+ }
+
+ /**
+ * Test of {@link HyphenationConsumer4a#parseWordSequence(CharSequence, int, int, ParaConfig)}.
+ * @throws OrthographyException Not expected here.
+ */
+ @Test
+ public void parseWordSequenceTest() throws OrthographyException {
+ /* Spoken by Henry, Henry V, Act III Scene 1. */
+ final String testString = "Once more unto the breach, dear friends, once more;";
+ final TokenFlow4a wordSequence =
+ this.consumer.tokenize(testString, 0, testString.length());
+ Assert.assertEquals(20, wordSequence.qtyTokens());
+ Assert.assertEquals("Once", wordSequence.tokenAt(0).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(1).toString());
+ Assert.assertEquals("more", wordSequence.tokenAt(2).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(3).toString());
+ Assert.assertEquals("un-to", wordSequence.tokenAt(4).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(5).toString());
+ Assert.assertEquals("the", wordSequence.tokenAt(6).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(7).toString());
+ Assert.assertEquals("breach", wordSequence.tokenAt(8).toString());
+ Assert.assertEquals(",", wordSequence.tokenAt(9).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(10).toString());
+ Assert.assertEquals("dear", wordSequence.tokenAt(11).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(12).toString());
+ Assert.assertEquals("friends", wordSequence.tokenAt(13).toString());
+ Assert.assertEquals(",", wordSequence.tokenAt(14).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(15).toString());
+ Assert.assertEquals("once", wordSequence.tokenAt(16).toString());
+ Assert.assertEquals(" ", wordSequence.tokenAt(17).toString());
+ Assert.assertEquals("more", wordSequence.tokenAt(18).toString());
+ Assert.assertEquals(";", wordSequence.tokenAt(19).toString());
+ }
+
+ /**
+ * Tests the English word "hyphenation".
+ * An English dictionary hyphenates this "hy-phen-a-tion".
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ @Test
+ public void testEnHyphenation() throws OrthographyException {
+ enHyphenation("hyphenation");
+ }
+
+ /**
+ * Tests the English word "HyphenAtion".
+ * This is the same test as {@link #testEnHyphenation()} except some uppercase characters are thrown into the word
+ * to test whether such cases are handled properly, that is, whether "hyphenation" and "HyphenAtion" are hyphenated
+ * identically, which they should be.
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ @Test
+ public void testEnHyphenationUpper() throws OrthographyException {
+ enHyphenation("HyphenAtion");
+ }
+
+ /**
+ * The actual test for {@link #testEnHyphenation()} and {@link #testEnHyphenationUpper()}.
+ * @param testWord The actual input word being tested, which should be some variant of "hyphenation".
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ public final void enHyphenation(final String testWord)
+ throws OrthographyException {
+ if (! testWord.toLowerCase().equals("hyphenation")) {
+ throw new OrthographyException("Test of \"hyphenation\" has invalid input.");
+ }
+ final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
+ final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
+ Assert.assertNotNull(hyphenation);
+ Assert.assertEquals(3, hyphenation.qtyHyphenationPoints());
+ Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
+ Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(1));
+ Assert.assertEquals(7, hyphenation.hyphenationPointOffsetAt(2));
+ }
+
+ /**
+ * Tests the English word "obligatory".
+ * An English dictionary hyphenates this "ob-lig-a-to-ry".
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ @Test
+ public void testEnObligatory() throws OrthographyException {
+ enObligatory("obligatory");
+ }
+
+ /**
+ * Tests the English word "ObliGatorY".
+ * This is the same test as {@link #testEnObligatory()} except some uppercase characters are thrown into the word to
+ * test whether such cases are handled properly, that is, whether "obligatory" and "ObliGatorY" are hyphenated
+ * identically, which they should be.
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ @Test
+ public void testEnObligatoryUpper() throws OrthographyException {
+ enObligatory("ObliGatorY");
+ }
+
+ /**
+ * The actual test for {@link #testEnObligatory()} and {@link #testEnObligatoryUpper()}.
+ * @param testWord The actual input word being tested, which should be some variant of "obligatory".
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ public final void enObligatory(final String testWord)
+ throws OrthographyException {
+ if (! testWord.toLowerCase().equals("obligatory")) {
+ throw new OrthographyException("Test of \"obligatory\" has invalid input.");
+ }
+ final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
+ final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
+ Assert.assertNotNull(hyphenation);
+ Assert.assertEquals(4, hyphenation.qtyHyphenationPoints());
+ Assert.assertEquals(2, hyphenation.hyphenationPointOffsetAt(0));
+ Assert.assertEquals(5, hyphenation.hyphenationPointOffsetAt(1));
+ Assert.assertEquals(6, hyphenation.hyphenationPointOffsetAt(2));
+ Assert.assertEquals(8, hyphenation.hyphenationPointOffsetAt(3));
+ }
+
+ /**
+ * Tests the English psuedo-word "table8" to ensure that a null hyphenation is returned.
+ * Null should be returned, because the character "8" is not included in any hyphenation character class for the
+ * English language.
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ @Test
+ public void testEnInvalidCharacter() throws OrthographyException {
+ final String testWord = "table8";
+ final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
+ final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
+ Assert.assertNull(hyphenation);
+ }
+
+ /**
+ * Test of a derived word, "times", which does not appear in the dictionary, while the base word "time" does
+ * appear.
+ * @throws OrthographyException For processing errors during hyphenation.
+ */
+ @Test
+ public void testTimes() throws OrthographyException {
+ final String testWord = "times";
+ final Orthography4a orthography = server.getOrthography(WritingSystem4a.USA);
+ final Word hyphenation = orthography.hyphenateUnrecognizedWord(testWord, 0, testWord.length());
+ Assert.assertNotNull(hyphenation);
+ Assert.assertEquals("times", hyphenation.toString());
+ Assert.assertEquals("time", hyphenation.getNormalizedContent());
+ Assert.assertEquals("times", hyphenation.getActualContent());
+ }
+
+}
Copied: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/OrthographyServer4aTests.java (from rev 12650, trunk/foray/foray-orthography/src/test/java/org/foray/orthography/HyphenationServer4aTests.java)
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/OrthographyServer4aTests.java (rev 0)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/OrthographyServer4aTests.java 2022-06-20 12:25:31 UTC (rev 12665)
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.orthography;
+
+import org.foray.common.Environment;
+import org.foray.common.i18n.Language4a;
+import org.foray.common.i18n.WritingSystem4a;
+
+import org.axsl.orthography.OrthographyException;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+
+/**
+ * Tests of {@link OrthographyServer4a}.
+ */
+public class OrthographyServer4aTests {
+
+ /** The object under test. */
+ private OrthographyServer4a out;
+
+ /**
+ * Set up the tests.
+ * @throws OrthographyException For errors during setup.
+ * @throws IOException For errors reading config files.
+ */
+ @Before
+ public final void setUp() throws OrthographyException, IOException {
+ this.out = makeHyphenationServer();
+ Assert.assertNotNull(this.out);
+ }
+
+ /**
+ * Returns a hyphenation server config that can be used by hyphenation tests.
+ * @return A hyphenation server config that can be used by hyphenation tests.
+ * @throws IOException For errors retrieving the environment, or creating the URLs.
+ */
+ public static OrthographyServerConfig makeHyphenationServerConfig() throws IOException {
+ final Properties buildProperties = Environment.getBuildProperties();
+ final String foraySandbox = buildProperties.getProperty("foray.sandbox");
+
+ final String orthographyConfigPath = foraySandbox
+ + "/foray-orthography/src/test/resources/orthography-config.xml";
+ final String rawDictionaryPath = foraySandbox + "/foray-orthography/src/main/data/dictionaries/";
+ final String parsedDictionaryPath =
+ foraySandbox + "/foray-orthography/src/main/resources/resources/org/foray/orthography/dictionaries/";
+ final String rawPatternsPath = foraySandbox + "/foray-orthography/src/main/data/hyph-patterns";
+ final String parsedPatternsPath =
+ foraySandbox + "/foray-orthography/src/main/resources/resources/org/foray/orthography/hyphPatterns/";
+ final String naturalLanguagePath = foraySandbox + "/foray-orthography/src/main/data/natural-languages/";
+
+ final URL orthographyFile = new URL("file", null, orthographyConfigPath);
+ final URL rawDictionary = new URL("file", null, rawDictionaryPath);
+ final URL parsedDictionary = new URL("file", null, parsedDictionaryPath);
+ final URL rawPatterns = new URL("file", null, rawPatternsPath);
+ final URL parsedPatterns = new URL("file", null, parsedPatternsPath);
+ final URL naturalLanguage = new URL("file", null, naturalLanguagePath);
+
+ final OrthographyServerConfig config = new OrthographyServerConfig();
+ config.setOrthographyConfigurationLocation(orthographyFile);
+ config.setWordListsBaseDirectory(rawDictionary);
+ config.setSerializedDictionariesBaseDirectory(parsedDictionary);
+ config.setRawHyphenationPatternsBaseDirectory(rawPatterns);
+ config.setSerializedHyphenationPatternsBaseDirectory(parsedPatterns);
+ config.setNaturalLanguagesBaseDirectory(naturalLanguage);
+ return config;
+ }
+
+ /**
+ * Creates an instance of {@link OrthographyServer4a}.
+ * @return The newly-created instance.
+ * @throws IOException For any errors creating the instance.
+ * @throws OrthographyException For errors creating a hyphenation server.
+ */
+ public static OrthographyServer4a makeHyphenationServer() throws IOException, OrthographyException {
+ final OrthographyServerConfig config = makeHyphenationServerConfig();
+ return new OrthographyServer4a(config);
+ }
+
+ /**
+ * Make sure that the resource files that are supposed to be available actually are.
+ * @throws OrthographyException For errors obtaining the various tree instances.
+ */
+ @Test
+ public void testResources() throws OrthographyException {
+ /* Using this variable for the expected source makes switching back and forth during testing easier. */
+ final PatternTree.Source expectedSource = PatternTree.Source.RESOURCES;
+
+ /* English, U.S. */
+ WritingSystem4a writingSystem = WritingSystem4a.USA;
+ PatternTree tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Finnish. */
+ writingSystem = WritingSystem4a.FINLAND;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Hungarian. */
+ writingSystem = WritingSystem4a.HUNGARY;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Italian. */
+ writingSystem = WritingSystem4a.ITALY;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Polish. */
+ writingSystem = WritingSystem4a.POLAND;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Portuguese. */
+ writingSystem = WritingSystem4a.PORTUGAL;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Russian. */
+ writingSystem = WritingSystem4a.RUSSIA;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Spanish. */
+ writingSystem = WritingSystem4a.SPAIN;
+ tree = this.out.getOrthography(writingSystem).getHyphenationPatterns();
+ Assert.assertNotNull(tree);
+ Assert.assertEquals(expectedSource, tree.getSource());
+
+ /* Try one that we know we don't have, Klingon. */
+ final Language4a language = Language4a.findFromAlpha("tlh");
+ writingSystem = WritingSystem4a.find(language, null, null);
+ /* We have not configured an orthography. */
+ Assert.assertNull(this.out.getOrthography(writingSystem));
+ }
+
+}
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java 2022-06-19 16:16:53 UTC (rev 12664)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/PatternTreeTests.java 2022-06-20 12:25:31 UTC (rev 12665)
@@ -53,7 +53,7 @@
*/
@BeforeClass
public static void beforeClass() throws IOException, OrthographyException {
- final OrthographyServer4a server = HyphenationServer4aTests.makeHyphenationServer();
+ final OrthographyServer4a server = OrthographyServer4aTests.makeHyphenationServer();
final WritingSystem4a writingSystem = WritingSystem4a.USA;
PatternTreeTests.patternTree = server.getOrthography(writingSystem).getHyphenationPatterns();
Assert.assertNotNull(PatternTreeTests.patternTree);
Modified: trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/NaturalLanguageTests.java
===================================================================
--- trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/NaturalLanguageTests.java 2022-06-19 16:16:53 UTC (rev 12664)
+++ trunk/foray/foray-orthography/src/test/java/org/foray/orthography/util/NaturalLanguageTests.java 2022-06-20 12:25:31 UTC (rev 12665)
@@ -29,8 +29,8 @@
package org.foray.orthography.util;
import org.foray.common.i18n.Language4a;
-import org.foray.orthography.HyphenationServer4aTests;
import org.foray.orthography.OrthographyServer4a;
+import org.foray.orthography.OrthographyServer4aTests;
import org.axsl.orthography.OrthographyException;
@@ -51,7 +51,7 @@
*/
@Test
public void testValidateText() throws IOException, OrthographyException {
- final OrthographyServer4a server = HyphenationServer4aTests.makeHyphenationServer();
+ final OrthographyServer4a server = OrthographyServer4aTests.makeHyphenationServer();
final NaturalLanguage nl = server.getNaturalLanguage(Language4a.findFrom3Char("mah"));
final int invalidChar = nl.validateText("ka" + '\u00B5' + "uri");
Assert.assertEquals(2, invalidChar);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-19 16:16:56
|
Revision: 12664
http://sourceforge.net/p/foray/code/12664
Author: victormote
Date: 2022-06-19 16:16:53 +0000 (Sun, 19 Jun 2022)
Log Message:
-----------
Fix broken test by removing unnecessary part of it.
Modified Paths:
--------------
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java 2022-06-18 18:20:45 UTC (rev 12663)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java 2022-06-19 16:16:53 UTC (rev 12664)
@@ -41,8 +41,11 @@
*/
@Test
public void registrationTest() {
- final int expectedCount = 8;
- Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
+ /* We used to test against a known constant value of preloaded writing systems here. However, other tests can
+ * corrupt that value since the data is all static. Rather than implementing any of the cumbersome solutions to
+ * this problem, we simply now capture it for testing below. What we really care about here is that duplicate
+ * object do not created for the same writing system. */
+ final int existingCount = WritingSystem4a.getCount();
/* Find some already-registered items multiple times. Purpose here is to make sure we aren't creating
* the same item multiple times. */
@@ -51,12 +54,12 @@
/* Check that both reference the same object. If not, the registration is not working correctly. */
Assert.assertTrue("Must reference the same object (USA)", pre == found);
/* The count of items in the class should not have changed from our assertion above. */
- Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
+ Assert.assertEquals(existingCount, WritingSystem4a.getCount());
pre = WritingSystem4a.FINLAND;
found = WritingSystem4a.find(pre.getLanguage(), pre.getScript(), pre.getCountry());
Assert.assertTrue("Must reference the same object (FINLAND)", pre == found);
- Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
+ Assert.assertEquals(existingCount, WritingSystem4a.getCount());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-18 18:20:48
|
Revision: 12663
http://sourceforge.net/p/foray/code/12663
Author: victormote
Date: 2022-06-18 18:20:45 +0000 (Sat, 18 Jun 2022)
Log Message:
-----------
Combine related test classes.
Modified Paths:
--------------
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
Removed Paths:
-------------
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Orthography4aTests.java
Deleted: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Orthography4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Orthography4aTests.java 2022-06-18 18:07:33 UTC (rev 12662)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Orthography4aTests.java 2022-06-18 18:20:45 UTC (rev 12663)
@@ -1,62 +0,0 @@
-/*
- * Copyright 2016 The FOray Project.
- * http://www.foray.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.common.i18n;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests of {@link WritingSystem4a}.
- */
-public class Orthography4aTests {
-
- /**
- * Basic test to make sure the class loads properly and returns some basic information.
- */
- @Test
- public void registrationTest() {
- final int expectedCount = 8;
- Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
-
- /* Find some already-registered items multiple times. Purpose here is to make sure we aren't creating
- * the same item multiple times. */
- WritingSystem4a pre = WritingSystem4a.USA;
- WritingSystem4a found = WritingSystem4a.find(pre.getLanguage(), pre.getScript(), pre.getCountry());
- /* Check that both reference the same object. If not, the registration is not working correctly. */
- Assert.assertTrue("Must reference the same object (USA)", pre == found);
- /* The count of items in the class should not have changed from our assertion above. */
- Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
-
- pre = WritingSystem4a.FINLAND;
- found = WritingSystem4a.find(pre.getLanguage(), pre.getScript(), pre.getCountry());
- Assert.assertTrue("Must reference the same object (FINLAND)", pre == found);
- Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
- }
-
-}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java 2022-06-18 18:07:33 UTC (rev 12662)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java 2022-06-18 18:20:45 UTC (rev 12663)
@@ -37,6 +37,29 @@
public class WritingSystem4aTests {
/**
+ * Basic test to make sure the class loads properly and returns some basic information.
+ */
+ @Test
+ public void registrationTest() {
+ final int expectedCount = 8;
+ Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
+
+ /* Find some already-registered items multiple times. Purpose here is to make sure we aren't creating
+ * the same item multiple times. */
+ WritingSystem4a pre = WritingSystem4a.USA;
+ WritingSystem4a found = WritingSystem4a.find(pre.getLanguage(), pre.getScript(), pre.getCountry());
+ /* Check that both reference the same object. If not, the registration is not working correctly. */
+ Assert.assertTrue("Must reference the same object (USA)", pre == found);
+ /* The count of items in the class should not have changed from our assertion above. */
+ Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
+
+ pre = WritingSystem4a.FINLAND;
+ found = WritingSystem4a.find(pre.getLanguage(), pre.getScript(), pre.getCountry());
+ Assert.assertTrue("Must reference the same object (FINLAND)", pre == found);
+ Assert.assertEquals(expectedCount, WritingSystem4a.getCount());
+ }
+
+ /**
* Tests of {@link WritingSystem4a#find(String)}.
*/
@Test
@@ -57,11 +80,13 @@
out = WritingSystem4a.find("ENG-lATN-usa");
parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.USA);
+ /* Exclude country. */
out = WritingSystem4a.find("eng-Latn");
parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.UNDETERMINED);
+ /* Exclude script. */
out = WritingSystem4a.find("eng-USA");
- parsingAssertions(out, Language4a.ENGLISH, Script4a.UNDETERMINED, Country4a.USA);
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.USA);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-18 18:07:35
|
Revision: 12662
http://sourceforge.net/p/foray/code/12662
Author: victormote
Date: 2022-06-18 18:07:33 +0000 (Sat, 18 Jun 2022)
Log Message:
-----------
Add concept of a default script for a language.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-06-18 17:26:44 UTC (rev 12661)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-06-18 18:07:33 UTC (rev 12662)
@@ -134,513 +134,526 @@
new HashMap<String, Language4a>(Language4a.QTY_TERMINOLOGY_ENTRIES,
(float) 1.0);
static {
- Language4a.register(new Language4a("aar", "aa", "Afar", "afar"));
- Language4a.register(new Language4a("abk", "ab", "Abkhazian", "abkhaze"));
- Language4a.register(new Language4a("ace", null, "Achinese", "aceh"));
- Language4a.register(new Language4a("ach", null, "Acoli", "acoli"));
- Language4a.register(new Language4a("ada", null, "Adangme", "adangme"));
- Language4a.register(new Language4a("ady", null, "Adyghe; Adygei", "adyghé"));
- Language4a.register(new Language4a("afa", null, "Afro-Asiatic(Other)", "afro-asiatiques, autres langues"));
- Language4a.register(new Language4a("afh", null, "Afrihili", "afrihili"));
- Language4a.register(new Language4a("afr", "af", "Afrikaans", "afrikaans"));
- Language4a.register(new Language4a("ain", null, "Ainu", "aïnou"));
- Language4a.register(new Language4a("aka", "ak", "Akan", "akan"));
- Language4a.register(new Language4a("akk", null, "Akkadian", "akkadien"));
- Language4a.register(new Language4a("alb", "sq", "Albanian", "albanais"));
- Language4a.register(new Language4a("ale", null, "Aleut", "aléoute"));
- Language4a.register(new Language4a("alg", null, "Algonquian languages", "algonquines, langues"));
- Language4a.register(new Language4a("alt", null, "Southern Altai", "altaï du Sud"));
- Language4a.register(new Language4a("amh", "am", "Amharic", "amharique"));
- Language4a.register(new Language4a("ang", null, "English, Old(ca.450-1100)", "anglo-saxon(ca.450-1100)"));
- Language4a.register(new Language4a("anp", null, "Angika", "angika"));
- Language4a.register(new Language4a("apa", null, "Apache languages", "apache"));
- Language4a.register(new Language4a("ara", "ar", "Arabic", "arabe"));
- Language4a.register(new Language4a("arc", null, "Aramaic", "araméen"));
- Language4a.register(new Language4a("arg", "an", "Aragonese", "aragonais"));
- Language4a.register(new Language4a("arm", "hy", "Armenian", "arménien"));
- Language4a.register(new Language4a("arn", null, "Araucanian", "araucan"));
- Language4a.register(new Language4a("arp", null, "Arapaho", "rapaho"));
- Language4a.register(new Language4a("art", null, "Artificial(Other)", "artificielles, autres langues"));
- Language4a.register(new Language4a("arw", null, "Arawak", "arawak"));
- Language4a.register(new Language4a("asm", "as", "Assamese", "assamais"));
- Language4a.register(new Language4a("ast", null, "Asturian; Bable", " asturien; bable"));
- Language4a.register(new Language4a("ath", null, "Athapascan languages", "athapascanes, langues"));
- Language4a.register(new Language4a("aus", null, "Australian languages", "australiennes, langues"));
- Language4a.register(new Language4a("ava", "av", "Avaric", "avar"));
- Language4a.register(new Language4a("ave", "ae", "Avestan", "avestique"));
- Language4a.register(new Language4a("awa", null, "Awadhi", "awadhi"));
- Language4a.register(new Language4a("aym", "ay", "Aymara", "aymara"));
- Language4a.register(new Language4a("aze", "az", "Azerbaijani", "azéri"));
- Language4a.register(new Language4a("bad", null, "", " banda"));
- Language4a.register(new Language4a("bai", null, "Bamileke languages", "bamilékés, langues"));
- Language4a.register(new Language4a("bak", "ba", "Bashkir", "bachkir"));
- Language4a.register(new Language4a("bal", null, "Baluchi", "baloutchi"));
- Language4a.register(new Language4a("bam", "bm", "Bambara", "bambara"));
- Language4a.register(new Language4a("ban", null, "Balinese", "balinais"));
- Language4a.register(new Language4a("baq", "eu", "Basque", "basque"));
- Language4a.register(new Language4a("bas", null, "Basa", "basa"));
- Language4a.register(new Language4a("bat", null, "Baltic(Other)", "baltiques, autres langues"));
- Language4a.register(new Language4a("bej", null, "Beja", "bedja"));
- Language4a.register(new Language4a("bel", "be", "Belarusian", "biélorusse"));
- Language4a.register(new Language4a("bem", null, "Bemba", "bemba"));
- Language4a.register(new Language4a("ben", "bn", "Bengali", "bengali"));
- Language4a.register(new Language4a("ber", null, "Berber(Other)", "berbères, autres langues"));
- Language4a.register(new Language4a("bho", null, "Bhojpuri", "bhojpuri"));
- Language4a.register(new Language4a("bih", "bh", "Bihari", "bihari"));
- Language4a.register(new Language4a("bik", null, "Bikol", "bikol"));
- Language4a.register(new Language4a("bin", null, "Bini", "bini"));
- Language4a.register(new Language4a("bis", "bi", "Bislama", "bichlamar"));
- Language4a.register(new Language4a("bla", null, "Siksika", "blackfoot"));
- Language4a.register(new Language4a("bnt", null, "Bantu(Other)", "bantoues, autres langues"));
- Language4a.register(new Language4a("tib", "bo", "Tibetan", "tibétain"));
- Language4a.register(new Language4a("bos", "bs", "Bosnian", "bosniaque"));
- Language4a.register(new Language4a("bra", null, "Braj", "braj"));
- Language4a.register(new Language4a("bre", "br", "Breton", "breton"));
- Language4a.register(new Language4a("btk", null, "Batak(Indonesia)", "batak(Indonésie)"));
- Language4a.register(new Language4a("bua", null, "Buriat", "bouriate"));
- Language4a.register(new Language4a("bug", null, "Buginese", "bugi"));
- Language4a.register(new Language4a("bul", "bg", "Bulgarian", "bulgare"));
- Language4a.register(new Language4a("bur", "my", "Burmese", "birman"));
- Language4a.register(new Language4a("byn", null, "Blin; Bilin", "blin; bilen"));
- Language4a.register(new Language4a("cad", null, "Caddo", "caddo"));
+ Language4a.register(new Language4a("aar", "aa", "Afar", "afar", null));
+ Language4a.register(new Language4a("abk", "ab", "Abkhazian", "abkhaze", null));
+ Language4a.register(new Language4a("ace", null, "Achinese", "aceh", null));
+ Language4a.register(new Language4a("ach", null, "Acoli", "acoli", null));
+ Language4a.register(new Language4a("ada", null, "Adangme", "adangme", null));
+ Language4a.register(new Language4a("ady", null, "Adyghe; Adygei", "adyghé", null));
+ Language4a.register(new Language4a("afa", null, "Afro-Asiatic(Other)", "afro-asiatiques, autres langues",
+ null));
+ Language4a.register(new Language4a("afh", null, "Afrihili", "afrihili", null));
+ Language4a.register(new Language4a("afr", "af", "Afrikaans", "afrikaans", null));
+ Language4a.register(new Language4a("ain", null, "Ainu", "aïnou", null));
+ Language4a.register(new Language4a("aka", "ak", "Akan", "akan", null));
+ Language4a.register(new Language4a("akk", null, "Akkadian", "akkadien", null));
+ Language4a.register(new Language4a("alb", "sq", "Albanian", "albanais", null));
+ Language4a.register(new Language4a("ale", null, "Aleut", "aléoute", null));
+ Language4a.register(new Language4a("alg", null, "Algonquian languages", "algonquines, langues", null));
+ Language4a.register(new Language4a("alt", null, "Southern Altai", "altaï du Sud", null));
+ Language4a.register(new Language4a("amh", "am", "Amharic", "amharique", null));
+ Language4a.register(new Language4a("ang", null, "English, Old(ca.450-1100)", "anglo-saxon(ca.450-1100)", null));
+ Language4a.register(new Language4a("anp", null, "Angika", "angika", null));
+ Language4a.register(new Language4a("apa", null, "Apache languages", "apache", null));
+ Language4a.register(new Language4a("ara", "ar", "Arabic", "arabe", null));
+ Language4a.register(new Language4a("arc", null, "Aramaic", "araméen", null));
+ Language4a.register(new Language4a("arg", "an", "Aragonese", "aragonais", null));
+ Language4a.register(new Language4a("arm", "hy", "Armenian", "arménien", null));
+ Language4a.register(new Language4a("arn", null, "Araucanian", "araucan", null));
+ Language4a.register(new Language4a("arp", null, "Arapaho", "rapaho", null));
+ Language4a.register(new Language4a("art", null, "Artificial(Other)", "artificielles, autres langues", null));
+ Language4a.register(new Language4a("arw", null, "Arawak", "arawak", null));
+ Language4a.register(new Language4a("asm", "as", "Assamese", "assamais", null));
+ Language4a.register(new Language4a("ast", null, "Asturian; Bable", " asturien; bable", null));
+ Language4a.register(new Language4a("ath", null, "Athapascan languages", "athapascanes, langues", null));
+ Language4a.register(new Language4a("aus", null, "Australian languages", "australiennes, langues", null));
+ Language4a.register(new Language4a("ava", "av", "Avaric", "avar", null));
+ Language4a.register(new Language4a("ave", "ae", "Avestan", "avestique", null));
+ Language4a.register(new Language4a("awa", null, "Awadhi", "awadhi", null));
+ Language4a.register(new Language4a("aym", "ay", "Aymara", "aymara", null));
+ Language4a.register(new Language4a("aze", "az", "Azerbaijani", "azéri", null));
+ Language4a.register(new Language4a("bad", null, "", " banda", null));
+ Language4a.register(new Language4a("bai", null, "Bamileke languages", "bamilékés, langues", null));
+ Language4a.register(new Language4a("bak", "ba", "Bashkir", "bachkir", null));
+ Language4a.register(new Language4a("bal", null, "Baluchi", "baloutchi", null));
+ Language4a.register(new Language4a("bam", "bm", "Bambara", "bambara", null));
+ Language4a.register(new Language4a("ban", null, "Balinese", "balinais", null));
+ Language4a.register(new Language4a("baq", "eu", "Basque", "basque", null));
+ Language4a.register(new Language4a("bas", null, "Basa", "basa", null));
+ Language4a.register(new Language4a("bat", null, "Baltic(Other)", "baltiques, autres langues", null));
+ Language4a.register(new Language4a("bej", null, "Beja", "bedja", null));
+ Language4a.register(new Language4a("bel", "be", "Belarusian", "biélorusse", null));
+ Language4a.register(new Language4a("bem", null, "Bemba", "bemba", null));
+ Language4a.register(new Language4a("ben", "bn", "Bengali", "bengali", null));
+ Language4a.register(new Language4a("ber", null, "Berber(Other)", "berbères, autres langues", null));
+ Language4a.register(new Language4a("bho", null, "Bhojpuri", "bhojpuri", null));
+ Language4a.register(new Language4a("bih", "bh", "Bihari", "bihari", null));
+ Language4a.register(new Language4a("bik", null, "Bikol", "bikol", null));
+ Language4a.register(new Language4a("bin", null, "Bini", "bini", null));
+ Language4a.register(new Language4a("bis", "bi", "Bislama", "bichlamar", null));
+ Language4a.register(new Language4a("bla", null, "Siksika", "blackfoot", null));
+ Language4a.register(new Language4a("bnt", null, "Bantu(Other)", "bantoues, autres langues", null));
+ Language4a.register(new Language4a("tib", "bo", "Tibetan", "tibétain", null));
+ Language4a.register(new Language4a("bos", "bs", "Bosnian", "bosniaque", null));
+ Language4a.register(new Language4a("bra", null, "Braj", "braj", null));
+ Language4a.register(new Language4a("bre", "br", "Breton", "breton", null));
+ Language4a.register(new Language4a("btk", null, "Batak(Indonesia)", "batak(Indonésie)", null));
+ Language4a.register(new Language4a("bua", null, "Buriat", "bouriate", null));
+ Language4a.register(new Language4a("bug", null, "Buginese", "bugi", null));
+ Language4a.register(new Language4a("bul", "bg", "Bulgarian", "bulgare", null));
+ Language4a.register(new Language4a("bur", "my", "Burmese", "birman", null));
+ Language4a.register(new Language4a("byn", null, "Blin; Bilin", "blin; bilen", null));
+ Language4a.register(new Language4a("cad", null, "Caddo", "caddo", null));
Language4a.register(new Language4a(
- "cai", null, "Central American Indian(Other)", "indiennes d'Amérique centrale, autres langues"));
- Language4a.register(new Language4a("car", null, "Carib", "caribe"));
- Language4a.register(new Language4a("cat", "ca", "Catalan; Valencian", "catalan; valencien"));
- Language4a.register(new Language4a("cau", null, "Caucasian(Other)", "caucasiennes, autres langues"));
- Language4a.register(new Language4a("ceb", null, "Cebuano", "cebuano"));
- Language4a.register(new Language4a("cel", null, "Celtic(Other)", "celtiques, autres langues"));
- Language4a.register(new Language4a("cze", "cs", "Czech", "tchèque"));
- Language4a.register(new Language4a("cha", "ch", "Chamorro", "chamorro"));
- Language4a.register(new Language4a("chb", null, "Chibcha", " chibcha"));
- Language4a.register(new Language4a("che", "ce", "Chechen", "tchétchène"));
- Language4a.register(new Language4a("chg", null, "Chagatai", "djaghataï"));
- Language4a.register(new Language4a("chi", "zh", "Chinese", "chinois"));
- Language4a.register(new Language4a("chk", null, "Chuukese", "chuuk"));
- Language4a.register(new Language4a("chm", null, "Mari", "mari"));
- Language4a.register(new Language4a("chn", null, "Chinook jargon", "chinook, jargon"));
- Language4a.register(new Language4a("cho", null, "Choctaw", "choctaw"));
- Language4a.register(new Language4a("chp", null, "Chipewyan", "chipewyan"));
- Language4a.register(new Language4a("chr", null, "Cherokee", "cherokee"));
+ "cai", null, "Central American Indian(Other)", "indiennes d'Amérique centrale, autres langues", null));
+ Language4a.register(new Language4a("car", null, "Carib", "caribe", null));
+ Language4a.register(new Language4a("cat", "ca", "Catalan; Valencian", "catalan; valencien", null));
+ Language4a.register(new Language4a("cau", null, "Caucasian(Other)", "caucasiennes, autres langues", null));
+ Language4a.register(new Language4a("ceb", null, "Cebuano", "cebuano", null));
+ Language4a.register(new Language4a("cel", null, "Celtic(Other)", "celtiques, autres langues", null));
+ Language4a.register(new Language4a("cze", "cs", "Czech", "tchèque", null));
+ Language4a.register(new Language4a("cha", "ch", "Chamorro", "chamorro", null));
+ Language4a.register(new Language4a("chb", null, "Chibcha", " chibcha", null));
+ Language4a.register(new Language4a("che", "ce", "Chechen", "tchétchène", null));
+ Language4a.register(new Language4a("chg", null, "Chagatai", "djaghataï", null));
+ Language4a.register(new Language4a("chi", "zh", "Chinese", "chinois", null));
+ Language4a.register(new Language4a("chk", null, "Chuukese", "chuuk", null));
+ Language4a.register(new Language4a("chm", null, "Mari", "mari", null));
+ Language4a.register(new Language4a("chn", null, "Chinook jargon", "chinook, jargon", null));
+ Language4a.register(new Language4a("cho", null, "Choctaw", "choctaw", null));
+ Language4a.register(new Language4a("chp", null, "Chipewyan", "chipewyan", null));
+ Language4a.register(new Language4a("chr", null, "Cherokee", "cherokee", null));
Language4a.register(new Language4a(
"chu", "cu", "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic",
- "slavon d'église; vieux slave; slavon liturgique; vieux bulgare"));
- Language4a.register(new Language4a("chv", "cv", "Chuvash", "tchouvache"));
- Language4a.register(new Language4a("chy", null, "Cheyenne", "cheyenne"));
- Language4a.register(new Language4a("cmc", null, "Chamic languages", "chames, langues"));
- Language4a.register(new Language4a("cop", null, "Coptic", "copte"));
- Language4a.register(new Language4a("cor", "kw", "Cornish", "cornique"));
- Language4a.register(new Language4a("cos", "co", "Corsican", "corse"));
+ "slavon d'église; vieux slave; slavon liturgique; vieux bulgare", null));
+ Language4a.register(new Language4a("chv", "cv", "Chuvash", "tchouvache", null));
+ Language4a.register(new Language4a("chy", null, "Cheyenne", "cheyenne", null));
+ Language4a.register(new Language4a("cmc", null, "Chamic languages", "chames, langues", null));
+ Language4a.register(new Language4a("cop", null, "Coptic", "copte", null));
+ Language4a.register(new Language4a("cor", "kw", "Cornish", "cornique", null));
+ Language4a.register(new Language4a("cos", "co", "Corsican", "corse", null));
Language4a.register(new Language4a(
- "cpe", null, "Creoles and pidgins, English based(Other)", "créoles et pidgins anglais, autres"));
+ "cpe", null, "Creoles and pidgins, English based(Other)", "créoles et pidgins anglais, autres", null));
Language4a.register(new Language4a(
- "cpf", null, "Creoles and pidgins, French-based(Other)", "créoles et pidgins français, autres"));
+ "cpf", null, "Creoles and pidgins, French-based(Other)", "créoles et pidgins français, autres", null));
Language4a.register(new Language4a(
- "cpp", null, "Creoles and pidgins, Portuguese-based(Other)", "créoles et pidgins portugais, autres"));
- Language4a.register(new Language4a("cre", "cr", "Cree", "cree"));
- Language4a.register(new Language4a("crh", null, "Crimean Tatar; Crimean Turkish", "tatar de Crimé"));
- Language4a.register(new Language4a("crp", null, "Creoles and pidgins(Other)", "créoles et pidgins divers"));
- Language4a.register(new Language4a("csb", null, "Kashubian", "kachoube"));
- Language4a.register(new Language4a("cus", null, "Cushitic(Other)", "couchitiques, autres langues"));
- Language4a.register(new Language4a("wel", "cy", "Welsh", "gallois"));
- Language4a.register(new Language4a("dak", null, "Dakota", "dakota"));
- Language4a.register(new Language4a("dan", "da", "Danish", "danois"));
- Language4a.register(new Language4a("dar", null, "Dargwa", "dargwa"));
- Language4a.register(new Language4a("day", null, "Dayak", "dayak"));
- Language4a.register(new Language4a("del", null, "Delaware", "delaware"));
- Language4a.register(new Language4a("den", null, "Slave(Athapascan)", "esclave(athapascan)"));
- Language4a.register(new Language4a("ger", "de", "German", "allemand"));
- Language4a.register(new Language4a("dgr", null, "Dogrib", "dogrib"));
- Language4a.register(new Language4a("din", null, "Dinka", "dinka"));
- Language4a.register(new Language4a("div", "dv", "Divehi; Dhivehi; Maldivian", " maldivien"));
- Language4a.register(new Language4a("doi", null, "Dogri", "dogri"));
- Language4a.register(new Language4a("dra", null, "Dravidian(Other)", "dravidiennes, autres langues"));
- Language4a.register(new Language4a("dsb", null, "Lower Sorbian", "bas-sorabe"));
- Language4a.register(new Language4a("dua", null, "Duala", "douala"));
+ "cpp", null, "Creoles and pidgins, Portuguese-based(Other)", "créoles et pidgins portugais, autres",
+ null));
+ Language4a.register(new Language4a("cre", "cr", "Cree", "cree", null));
+ Language4a.register(new Language4a("crh", null, "Crimean Tatar; Crimean Turkish", "tatar de Crimé", null));
+ Language4a.register(new Language4a("crp", null, "Creoles and pidgins(Other)", "créoles et pidgins divers",
+ null));
+ Language4a.register(new Language4a("csb", null, "Kashubian", "kachoube", null));
+ Language4a.register(new Language4a("cus", null, "Cushitic(Other)", "couchitiques, autres langues", null));
+ Language4a.register(new Language4a("wel", "cy", "Welsh", "gallois", null));
+ Language4a.register(new Language4a("dak", null, "Dakota", "dakota", null));
+ Language4a.register(new Language4a("dan", "da", "Danish", "danois", null));
+ Language4a.register(new Language4a("dar", null, "Dargwa", "dargwa", null));
+ Language4a.register(new Language4a("day", null, "Dayak", "dayak", null));
+ Language4a.register(new Language4a("del", null, "Delaware", "delaware", null));
+ Language4a.register(new Language4a("den", null, "Slave(Athapascan)", "esclave(athapascan)", null));
+ Language4a.register(new Language4a("ger", "de", "German", "allemand", null));
+ Language4a.register(new Language4a("dgr", null, "Dogrib", "dogrib", null));
+ Language4a.register(new Language4a("din", null, "Dinka", "dinka", null));
+ Language4a.register(new Language4a("div", "dv", "Divehi; Dhivehi; Maldivian", " maldivien", null));
+ Language4a.register(new Language4a("doi", null, "Dogri", "dogri", null));
+ Language4a.register(new Language4a("dra", null, "Dravidian(Other)", "dravidiennes, autres langues", null));
+ Language4a.register(new Language4a("dsb", null, "Lower Sorbian", "bas-sorabe", null));
+ Language4a.register(new Language4a("dua", null, "Duala", "douala", null));
Language4a.register(new Language4a(
- "dum", null, "Dutch, Middle(ca.1050-1350)", "néerlandais moyen(ca. 1050-1350)"));
- Language4a.register(new Language4a("dut", "nl", "Dutch; Flemish", "néerlandais; flamand"));
- Language4a.register(new Language4a("dyu", null, "Dyula", "dioula"));
- Language4a.register(new Language4a("dzo", "dz", "Dzongkha", "dzongkha"));
- Language4a.register(new Language4a("efi", null, "Efik", "efik"));
- Language4a.register(new Language4a("egy", null, "Egyptian(Ancient)", "égyptien"));
- Language4a.register(new Language4a("eka", null, "Ekajuk", "ekajuk"));
- Language4a.register(new Language4a("gre", "el", "Greek, Modern(1453-)", "grec moderne(après 1453)"));
- Language4a.register(new Language4a("elx", null, "Elamite", "élamite"));
- Language4a.register(new Language4a("eng", "en", "English", "anglais"));
- Language4a.register(new Language4a("enm", null, "English, Middle(1100-1500)", "anglais moyen(1100-1500)"));
- Language4a.register(new Language4a("epo", "eo", "Esperanto", "espéranto"));
- Language4a.register(new Language4a("est", "et", "Estonian", "estonien"));
- Language4a.register(new Language4a("ewe", "ee", "Ewe", "éwé"));
- Language4a.register(new Language4a("ewo", null, "Ewondo", "éwondo"));
- Language4a.register(new Language4a("fan", null, "Fang", "fang"));
- Language4a.register(new Language4a("fao", "fo", "Faroese", "féroïen"));
- Language4a.register(new Language4a("per", "fa", "Persian", "persan"));
- Language4a.register(new Language4a("fat", null, "Fanti", "fanti"));
- Language4a.register(new Language4a("fij", "fj", "Fijian", "fidjien"));
- Language4a.register(new Language4a("fil", null, "Filipino; Pilipino", "filipino; pilipino"));
- Language4a.register(new Language4a("fin", "fi", "Finnish", "finnois"));
- Language4a.register(new Language4a("fiu", null, "Finno-Ugrian(Other)", "finno-ougriennes, autres langues"));
- Language4a.register(new Language4a(Language4a.STRING_FON, null, "Fon", Language4a.STRING_FON));
- Language4a.register(new Language4a("fre", "fr", "French", "français"));
- Language4a.register(new Language4a("frm", null, "French, Middle(ca.1400-1600)", "français moyen(1400-1600)"));
- Language4a.register(new Language4a("fro", null, "French, Old(842-ca.1400)", "français ancien(842-ca.1400)"));
- Language4a.register(new Language4a("frr", null, "Northern Frisian", "frison septentrional"));
- Language4a.register(new Language4a("frs", null, "Eastern Frisian", "frison oriental"));
- Language4a.register(new Language4a("fry", "fy", "Western Frisian", "frison occidental"));
- Language4a.register(new Language4a("ful", "ff", "Fulah", "peul"));
- Language4a.register(new Language4a("fur", null, "Friulian", "frioulan"));
- Language4a.register(new Language4a("gaa", null, "Ga", Language4a.STRING_GA));
- Language4a.register(new Language4a("gay", null, "Gayo", " gayo"));
- Language4a.register(new Language4a("gba", null, "Gbaya", "gbaya"));
- Language4a.register(new Language4a("gem", null, "Germanic(Other)", "germaniques, autres langues"));
- Language4a.register(new Language4a("geo", "ka", "Georgian", "géorgien"));
- Language4a.register(new Language4a("gez", null, "Geez", "guèze"));
- Language4a.register(new Language4a("gil", null, "Gilbertese", "kiribati"));
- Language4a.register(new Language4a("gla", "gd", "Gaelic; Scottish Gaelic", "gaélique; gaélique écossais"));
- Language4a.register(new Language4a("gle", Language4a.STRING_GA, "Irish", "irlandais"));
- Language4a.register(new Language4a("glg", "gl", "Galician", "galicien"));
- Language4a.register(new Language4a("glv", "gv", "Manx", "manx; mannois"));
+ "dum", null, "Dutch, Middle(ca.1050-1350)", "néerlandais moyen(ca. 1050-1350)", null));
+ Language4a.register(new Language4a("dut", "nl", "Dutch; Flemish", "néerlandais; flamand", Script4a.LATIN));
+ Language4a.register(new Language4a("dyu", null, "Dyula", "dioula", null));
+ Language4a.register(new Language4a("dzo", "dz", "Dzongkha", "dzongkha", null));
+ Language4a.register(new Language4a("efi", null, "Efik", "efik", null));
+ Language4a.register(new Language4a("egy", null, "Egyptian(Ancient)", "égyptien", null));
+ Language4a.register(new Language4a("eka", null, "Ekajuk", "ekajuk", null));
+ Language4a.register(new Language4a("gre", "el", "Greek, Modern(1453-)", "grec moderne(après 1453)", null));
+ Language4a.register(new Language4a("elx", null, "Elamite", "élamite", null));
+ Language4a.register(new Language4a("eng", "en", "English", "anglais", Script4a.LATIN));
+ Language4a.register(new Language4a("enm", null, "English, Middle(1100-1500)", "anglais moyen(1100-1500)",
+ null));
+ Language4a.register(new Language4a("epo", "eo", "Esperanto", "espéranto", null));
+ Language4a.register(new Language4a("est", "et", "Estonian", "estonien", null));
+ Language4a.register(new Language4a("ewe", "ee", "Ewe", "éwé", null));
+ Language4a.register(new Language4a("ewo", null, "Ewondo", "éwondo", null));
+ Language4a.register(new Language4a("fan", null, "Fang", "fang", null));
+ Language4a.register(new Language4a("fao", "fo", "Faroese", "féroïen", null));
+ Language4a.register(new Language4a("per", "fa", "Persian", "persan", null));
+ Language4a.register(new Language4a("fat", null, "Fanti", "fanti", null));
+ Language4a.register(new Language4a("fij", "fj", "Fijian", "fidjien", null));
+ Language4a.register(new Language4a("fil", null, "Filipino; Pilipino", "filipino; pilipino", null));
+ Language4a.register(new Language4a("fin", "fi", "Finnish", "finnois", null));
+ Language4a.register(new Language4a("fiu", null, "Finno-Ugrian(Other)", "finno-ougriennes, autres langues",
+ null));
+ Language4a.register(new Language4a(Language4a.STRING_FON, null, "Fon", Language4a.STRING_FON, null));
+ Language4a.register(new Language4a("fre", "fr", "French", "français", Script4a.LATIN));
+ Language4a.register(new Language4a("frm", null, "French, Middle(ca.1400-1600)", "français moyen(1400-1600)",
+ null));
+ Language4a.register(new Language4a("fro", null, "French, Old(842-ca.1400)", "français ancien(842-ca.1400)",
+ null));
+ Language4a.register(new Language4a("frr", null, "Northern Frisian", "frison septentrional", null));
+ Language4a.register(new Language4a("frs", null, "Eastern Frisian", "frison oriental", null));
+ Language4a.register(new Language4a("fry", "fy", "Western Frisian", "frison occidental", null));
+ Language4a.register(new Language4a("ful", "ff", "Fulah", "peul", null));
+ Language4a.register(new Language4a("fur", null, "Friulian", "frioulan", null));
+ Language4a.register(new Language4a("gaa", null, "Ga", Language4a.STRING_GA, null));
+ Language4a.register(new Language4a("gay", null, "Gayo", " gayo", null));
+ Language4a.register(new Language4a("gba", null, "Gbaya", "gbaya", null));
+ Language4a.register(new Language4a("gem", null, "Germanic(Other)", "germaniques, autres langues", null));
+ Language4a.register(new Language4a("geo", "ka", "Georgian", "géorgien", null));
+ Language4a.register(new Language4a("gez", null, "Geez", "guèze", null));
+ Language4a.register(new Language4a("gil", null, "Gilbertese", "kiribati", null));
+ Language4a.register(new Language4a("gla", "gd", "Gaelic; Scottish Gaelic", "gaélique; gaélique écossais",
+ null));
+ Language4a.register(new Language4a("gle", Language4a.STRING_GA, "Irish", "irlandais", null));
+ Language4a.register(new Language4a("glg", "gl", "Galician", "galicien", null));
+ Language4a.register(new Language4a("glv", "gv", "Manx", "manx; mannois", null));
Language4a.register(new Language4a(
- "gmh", null, "German, Middle High(ca.1050-1500)", "allemand, moyen haut(ca. 1050-1500)"));
+ "gmh", null, "German, Middle High(ca.1050-1500)", "allemand, moyen haut(ca. 1050-1500)", null));
Language4a.register(new Language4a(
- "goh", null, "German, Old High(ca.750-1050)", "allemand, vieux haut(ca. 750-1050)"));
- Language4a.register(new Language4a("gon", null, "Gondi", "gond"));
- Language4a.register(new Language4a("gor", null, "Gorontalo", "gorontalo"));
- Language4a.register(new Language4a("got", null, "Gothic", "gothique"));
- Language4a.register(new Language4a("grb", null, "Grebo", "grebo"));
- Language4a.register(new Language4a("grc", null, "Greek, Ancient(to 1453)", "grec ancien(jusqu'à 1453)"));
- Language4a.register(new Language4a("grn", "gn", "Guarani", "guarani"));
- Language4a.register(new Language4a("gsw", null, "Alemanic; Swiss German", " alémanique"));
- Language4a.register(new Language4a("guj", "gu", "Gujarati", "goudjrati"));
- Language4a.register(new Language4a("gwi", null, "Gwich´in", "gwich´in"));
- Language4a.register(new Language4a("hai", null, "Haida", "haida"));
- Language4a.register(new Language4a("hat", "ht", "Haitian; Haitian Creole", "haïtien; créole haïtien"));
- Language4a.register(new Language4a("hau", "ha", "Hausa", "haoussa"));
- Language4a.register(new Language4a("haw", null, "Hawaiian", "hawaïen"));
- Language4a.register(new Language4a("heb", "he", "Hebrew", "hébreu"));
- Language4a.register(new Language4a("her", "hz", "Herero", " herero"));
- Language4a.register(new Language4a("hil", null, "Hiligaynon", "hiligaynon"));
- Language4a.register(new Language4a("him", null, "Himachali", "himachali"));
- Language4a.register(new Language4a("hin", "hi", "Hindi", "hindi"));
- Language4a.register(new Language4a("hit", null, "Hittite", "hittite"));
- Language4a.register(new Language4a("hmn", null, "Hmong", "hmong"));
- Language4a.register(new Language4a("hmo", "ho", "Hiri Motu", "hiri motu"));
- Language4a.register(new Language4a("scr", "hr", "Croatian", "croate"));
- Language4a.register(new Language4a("hsb", null, "Upper Sorbian", "haut-sorabe"));
- Language4a.register(new Language4a("hun", "hu", "Hungarian", "hongrois"));
- Language4a.register(new Language4a("hup", null, "Hupa", "hupa"));
- Language4a.register(new Language4a("iba", null, "Iban", "iban"));
- Language4a.register(new Language4a("ibo", "ig", "Igbo", "igbo"));
- Language4a.register(new Language4a("ice", "is", "Icelandic", "islandais"));
- Language4a.register(new Language4a(Language4a.STRING_IDO, "io", "Ido", Language4a.STRING_IDO));
- Language4a.register(new Language4a("iii", "ii", "Sichuan Yi", "yi de Sichuan"));
- Language4a.register(new Language4a(Language4a.STRING_IJO, null, "Ijo", Language4a.STRING_IJO));
- Language4a.register(new Language4a("iku", "iu", "Inuktitut", "inuktitut"));
- Language4a.register(new Language4a("ile", "ie", "Interlingue", "interlingue"));
- Language4a.register(new Language4a("ilo", null, "Iloko", "ilocano"));
+ "goh", null, "German, Old High(ca.750-1050)", "allemand, vieux haut(ca. 750-1050)", null));
+ Language4a.register(new Language4a("gon", null, "Gondi", "gond", null));
+ Language4a.register(new Language4a("gor", null, "Gorontalo", "gorontalo", null));
+ Language4a.register(new Language4a("got", null, "Gothic", "gothique", null));
+ Language4a.register(new Language4a("grb", null, "Grebo", "grebo", null));
+ Language4a.register(new Language4a("grc", null, "Greek, Ancient(to 1453)", "grec ancien(jusqu'à 1453)", null));
+ Language4a.register(new Language4a("grn", "gn", "Guarani", "guarani", null));
+ Language4a.register(new Language4a("gsw", null, "Alemanic; Swiss German", " alémanique", null));
+ Language4a.register(new Language4a("guj", "gu", "Gujarati", "goudjrati", null));
+ Language4a.register(new Language4a("gwi", null, "Gwich´in", "gwich´in", null));
+ Language4a.register(new Language4a("hai", null, "Haida", "haida", null));
+ Language4a.register(new Language4a("hat", "ht", "Haitian; Haitian Creole", "haïtien; créole haïtien", null));
+ Language4a.register(new Language4a("hau", "ha", "Hausa", "haoussa", null));
+ Language4a.register(new Language4a("haw", null, "Hawaiian", "hawaïen", null));
+ Language4a.register(new Language4a("heb", "he", "Hebrew", "hébreu", null));
+ Language4a.register(new Language4a("her", "hz", "Herero", " herero", null));
+ Language4a.register(new Language4a("hil", null, "Hiligaynon", "hiligaynon", null));
+ Language4a.register(new Language4a("him", null, "Himachali", "himachali", null));
+ Language4a.register(new Language4a("hin", "hi", "Hindi", "hindi", null));
+ Language4a.register(new Language4a("hit", null, "Hittite", "hittite", null));
+ Language4a.register(new Language4a("hmn", null, "Hmong", "hmong", null));
+ Language4a.register(new Language4a("hmo", "ho", "Hiri Motu", "hiri motu", null));
+ Language4a.register(new Language4a("scr", "hr", "Croatian", "croate", null));
+ Language4a.register(new Language4a("hsb", null, "Upper Sorbian", "haut-sorabe", null));
+ Language4a.register(new Language4a("hun", "hu", "Hungarian", "hongrois", null));
+ Language4a.register(new Language4a("hup", null, "Hupa", "hupa", null));
+ Language4a.register(new Language4a("iba", null, "Iban", "iban", null));
+ Language4a.register(new Language4a("ibo", "ig", "Igbo", "igbo", null));
+ Language4a.register(new Language4a("ice", "is", "Icelandic", "islandais", null));
+ Language4a.register(new Language4a(Language4a.STRING_IDO, "io", "Ido", Language4a.STRING_IDO, null));
+ Language4a.register(new Language4a("iii", "ii", "Sichuan Yi", "yi de Sichuan", null));
+ Language4a.register(new Language4a(Language4a.STRING_IJO, null, "Ijo", Language4a.STRING_IJO, null));
+ Language4a.register(new Language4a("iku", "iu", "Inuktitut", "inuktitut", null));
+ Language4a.register(new Language4a("ile", "ie", "Interlingue", "interlingue", null));
+ Language4a.register(new Language4a("ilo", null, "Iloko", "ilocano", null));
Language4a.register(new Language4a(
"ina", "ia", "Interlingua(International Auxiliary Language Association)",
- "interlingua(langue auxiliaire internationale)"));
- Language4a.register(new Language4a("inc", null, "Indic(Other)", "indo-aryennes, autres langues"));
- Language4a.register(new Language4a("ind", "id", "Indonesian", "indonésien"));
- Language4a.register(new Language4a("ine", null, "Indo-European(Other)", "indo-européennes, autres langues"));
- Language4a.register(new Language4a("inh", null, "Ingush", "ingouche"));
- Language4a.register(new Language4a("ipk", "ik", "Inupiaq", "inupiaq"));
- Language4a.register(new Language4a("ira", null, "Iranian(Other)", "iraniennes, autres langues"));
- Language4a.register(new Language4a("iro", null, "Iroquoian languages", "iroquoises, langues(famille)"));
- Language4a.register(new Language4a("ita", "it", "Italian", "italien"));
- Language4a.register(new Language4a("jav", "jv", "Javanese", "javanais"));
- Language4a.register(new Language4a("jbo", null, "Lojban", "lojban"));
- Language4a.register(new Language4a("jpn", "ja", "Japanese", "japonais"));
- Language4a.register(new Language4a("jpr", null, "Judeo-Persian", "judéo-persan"));
- Language4a.register(new Language4a("jrb", null, "Judeo-Arabic", "judéo-arabe"));
- Language4a.register(new Language4a("kaa", null, "Kara-Kalpak", "karakalpak"));
- Language4a.register(new Language4a("kab", null, "Kabyle", "kabyle"));
- Language4a.register(new Language4a("kac", null, "Kachin", "kachin"));
- Language4a.register(new Language4a("kal", "kl", "; Greenlandic", "groenlandais"));
- Language4a.register(new Language4a("kam", null, "Kamba", "kamba"));
- Language4a.register(new Language4a("kan", "kn", "Kannada", "kannada"));
- Language4a.register(new Language4a("kar", null, "Karen", "karen"));
- Language4a.register(new Language4a("kas", "ks", "Kashmiri", "kashmiri"));
- Language4a.register(new Language4a("kau", "kr", "Kanuri", "kanouri"));
- Language4a.register(new Language4a("kaw", null, "Kawi", "kawi"));
- Language4a.register(new Language4a("kaz", "kk", "Kazakh", "kazakh"));
- Language4a.register(new Language4a("kbd", null, "Kabardian", "kabardien"));
- Language4a.register(new Language4a("kha", null, "Khasi", "khasi"));
- Language4a.register(new Language4a("khi", null, "Khoisan(Other)", "khoisan, autres langues"));
- Language4a.register(new Language4a("khm", "km", "Khmer", "khmer"));
- Language4a.register(new Language4a("kho", null, "Khotanese", "khotanais"));
- Language4a.register(new Language4a("kik", "ki", "Kikuyu; Gikuyu", "kikuyu"));
- Language4a.register(new Language4a("kin", "rw", "Kinyarwanda", "rwanda"));
- Language4a.register(new Language4a("kir", "ky", "Kirghiz", "kirghize"));
- Language4a.register(new Language4a("kmb", null, "Kimbundu", "kimbundu"));
- Language4a.register(new Language4a("kok", null, "Konkani", "konkani"));
- Language4a.register(new Language4a(Language4a.STRING_KOM, "kv", "Komi", Language4a.STRING_KOM));
- Language4a.register(new Language4a("kon", "kg", "Kongo", "kongo"));
- Language4a.register(new Language4a("kor", "ko", "Korean", "coréen"));
- Language4a.register(new Language4a("kos", null, "Kosraean", "kosrae"));
- Language4a.register(new Language4a("kpe", null, "Kpelle", "kpellé"));
- Language4a.register(new Language4a("krc", null, "Karachay-Balkar", "karatchaï balkar"));
- Language4a.register(new Language4a("krl", null, "Karelian", "carélien"));
- Language4a.register(new Language4a("kro", null, "Kru", "krou"));
- Language4a.register(new Language4a("kru", null, "Kurukh", "kurukh"));
- Language4a.register(new Language4a("kua", "kj", "Kuanyama; Kwanyama", "kuanyama; kwanyama"));
- Language4a.register(new Language4a("kum", null, "Kumyk", "koumyk"));
- Language4a.register(new Language4a("kur", "ku", "Kurdish", "kurde"));
- Language4a.register(new Language4a("kut", null, "Kutenai", "kutenai"));
- Language4a.register(new Language4a("lad", null, "Ladino", "judéo-espagnol"));
- Language4a.register(new Language4a("lah", null, "Lahnda", "lahnda"));
- Language4a.register(new Language4a("lam", null, "Lamba", "lamba"));
- Language4a.register(new Language4a(Language4a.STRING_LAO, "lo", "Lao", Language4a.STRING_LAO));
- Language4a.register(new Language4a("lat", "la", "Latin", "latin"));
- Language4a.register(new Language4a("lav", "lv", "Latvian", "letton"));
- Language4a.register(new Language4a("lez", null, "Lezghian", "lezghien"));
- Language4a.register(new Language4a("lim", "li", "Limburgan; Limburger;", "Limburgish limbourgeois"));
- Language4a.register(new Language4a("lin", "ln", "Lingala", "lingala"));
- Language4a.register(new Language4a("lit", "lt", "Lithuanian", "lituanien"));
- Language4a.register(new Language4a("lol", null, "Mongo", "mongo"));
- Language4a.register(new Language4a("loz", null, "Lozi", "lozi"));
- Language4a.register(new Language4a("ltz", "lb", "Luxembourgish; Letzeburgesch", "luxembourgeois"));
- Language4a.register(new Language4a("lua", null, "Luba-Lulua", "luba-lulua"));
- Language4a.register(new Language4a("lub", "lu", "Luba-Katanga", "luba-katanga"));
- Language4a.register(new Language4a("lug", "lg", "Ganda", "ganda"));
- Language4a.register(new Language4a("lui", null, "Luiseno", "luiseno"));
- Language4a.register(new Language4a("lun", null, "Lunda", "lunda"));
- Language4a.register(new Language4a("luo", null, "Luo(Kenya and Tanzania)", "luo(Kenya et Tanzanie)"));
- Language4a.register(new Language4a("lus", null, "lushai", "Lushai"));
- Language4a.register(new Language4a("mac", "mk", "Macedonian", "macédonien"));
- Language4a.register(new Language4a("mad", null, "Madurese", "madourais"));
- Language4a.register(new Language4a("mag", null, "Magahi", "magahi"));
- Language4a.register(new Language4a("mah", "mh", "Marshallese", "marshall"));
- Language4a.register(new Language4a("mai", null, "Maithili", "maithili"));
- Language4a.register(new Language4a("mak", null, "Makasar", "makassar"));
- Language4a.register(new Language4a("mal", "ml", "Malayalam", "malayalam"));
- Language4a.register(new Language4a("man", null, "Mandingo", "mandingue"));
- Language4a.register(new Language4a("mao", "mi", "Maori", "maori"));
+ "interlingua(langue auxiliaire internationale)", null));
+ Language4a.register(new Language4a("inc", null, "Indic(Other)", "indo-aryennes, autres langues", null));
+ Language4a.register(new Language4a("ind", "id", "Indonesian", "indonésien", null));
+ Language4a.register(new Language4a("ine", null, "Indo-European(Other)", "indo-européennes, autres langues",
+ null));
+ Language4a.register(new Language4a("inh", null, "Ingush", "ingouche", null));
+ Language4a.register(new Language4a("ipk", "ik", "Inupiaq", "inupiaq", null));
+ Language4a.register(new Language4a("ira", null, "Iranian(Other)", "iraniennes, autres langues", null));
+ Language4a.register(new Language4a("iro", null, "Iroquoian languages", "iroquoises, langues(famille)", null));
+ Language4a.register(new Language4a("ita", "it", "Italian", "italien", Script4a.LATIN));
+ Language4a.register(new Language4a("jav", "jv", "Javanese", "javanais", null));
+ Language4a.register(new Language4a("jbo", null, "Lojban", "lojban", null));
+ Language4a.register(new Language4a("jpn", "ja", "Japanese", "japonais", null));
+ Language4a.register(new Language4a("jpr", null, "Judeo-Persian", "judéo-persan", null));
+ Language4a.register(new Language4a("jrb", null, "Judeo-Arabic", "judéo-arabe", null));
+ Language4a.register(new Language4a("kaa", null, "Kara-Kalpak", "karakalpak", null));
+ Language4a.register(new Language4a("kab", null, "Kabyle", "kabyle", null));
+ Language4a.register(new Language4a("kac", null, "Kachin", "kachin", null));
+ Language4a.register(new Language4a("kal", "kl", "; Greenlandic", "groenlandais", null));
+ Language4a.register(new Language4a("kam", null, "Kamba", "kamba", null));
+ Language4a.register(new Language4a("kan", "kn", "Kannada", "kannada", null));
+ Language4a.register(new Language4a("kar", null, "Karen", "karen", null));
+ Language4a.register(new Language4a("kas", "ks", "Kashmiri", "kashmiri", null));
+ Language4a.register(new Language4a("kau", "kr", "Kanuri", "kanouri", null));
+ Language4a.register(new Language4a("kaw", null, "Kawi", "kawi", null));
+ Language4a.register(new Language4a("kaz", "kk", "Kazakh", "kazakh", null));
+ Language4a.register(new Language4a("kbd", null, "Kabardian", "kabardien", null));
+ Language4a.register(new Language4a("kha", null, "Khasi", "khasi", null));
+ Language4a.register(new Language4a("khi", null, "Khoisan(Other)", "khoisan, autres langues", null));
+ Language4a.register(new Language4a("khm", "km", "Khmer", "khmer", null));
+ Language4a.register(new Language4a("kho", null, "Khotanese", "khotanais", null));
+ Language4a.register(new Language4a("kik", "ki", "Kikuyu; Gikuyu", "kikuyu", null));
+ Language4a.register(new Language4a("kin", "rw", "Kinyarwanda", "rwanda", null));
+ Language4a.register(new Language4a("kir", "ky", "Kirghiz", "kirghize", null));
+ Language4a.register(new Language4a("kmb", null, "Kimbundu", "kimbundu", null));
+ Language4a.register(new Language4a("kok", null, "Konkani", "konkani", null));
+ Language4a.register(new Language4a(Language4a.STRING_KOM, "kv", "Komi", Language4a.STRING_KOM, null));
+ Language4a.register(new Language4a("kon", "kg", "Kongo", "kongo", null));
+ Language4a.register(new Language4a("kor", "ko", "Korean", "coréen", null));
+ Language4a.register(new Language4a("kos", null, "Kosraean", "kosrae", null));
+ Language4a.register(new Language4a("kpe", null, "Kpelle", "kpellé", null));
+ Language4a.register(new Language4a("krc", null, "Karachay-Balkar", "karatchaï balkar", null));
+ Language4a.register(new Language4a("krl", null, "Karelian", "carélien", null));
+ Language4a.register(new Language4a("kro", null, "Kru", "krou", null));
+ Language4a.register(new Language4a("kru", null, "Kurukh", "kurukh", null));
+ Language4a.register(new Language4a("kua", "kj", "Kuanyama; Kwanyama", "kuanyama; kwanyama", null));
+ Language4a.register(new Language4a("kum", null, "Kumyk", "koumyk", null));
+ Language4a.register(new Language4a("kur", "ku", "Kurdish", "kurde", null));
+ Language4a.register(new Language4a("kut", null, "Kutenai", "kutenai", null));
+ Language4a.register(new Language4a("lad", null, "Ladino", "judéo-espagnol", null));
+ Language4a.register(new Language4a("lah", null, "Lahnda", "lahnda", null));
+ Language4a.register(new Language4a("lam", null, "Lamba", "lamba", null));
+ Language4a.register(new Language4a(Language4a.STRING_LAO, "lo", "Lao", Language4a.STRING_LAO, null));
+ Language4a.register(new Language4a("lat", "la", "Latin", "latin", Script4a.LATIN));
+ Language4a.register(new Language4a("lav", "lv", "Latvian", "letton", null));
+ Language4a.register(new Language4a("lez", null, "Lezghian", "lezghien", null));
+ Language4a.register(new Language4a("lim", "li", "Limburgan; Limburger;", "Limburgish limbourgeois", null));
+ Language4a.register(new Language4a("lin", "ln", "Lingala", "lingala", null));
+ Language4a.register(new Language4a("lit", "lt", "Lithuanian", "lituanien", null));
+ Language4a.register(new Language4a("lol", null, "Mongo", "mongo", null));
+ Language4a.register(new Language4a("loz", null, "Lozi", "lozi", null));
+ Language4a.register(new Language4a("ltz", "lb", "Luxembourgish; Letzeburgesch", "luxembourgeois", null));
+ Language4a.register(new Language4a("lua", null, "Luba-Lulua", "luba-lulua", null));
+ Language4a.register(new Language4a("lub", "lu", "Luba-Katanga", "luba-katanga", null));
+ Language4a.register(new Language4a("lug", "lg", "Ganda", "ganda", null));
+ Language4a.register(new Language4a("lui", null, "Luiseno", "luiseno", null));
+ Language4a.register(new Language4a("lun", null, "Lunda", "lunda", null));
+ Language4a.register(new Language4a("luo", null, "Luo(Kenya and Tanzania)", "luo(Kenya et Tanzanie)", null));
+ Language4a.register(new Language4a("lus", null, "lushai", "Lushai", null));
+ Language4a.register(new Language4a("mac", "mk", "Macedonian", "macédonien", null));
+ Language4a.register(new Language4a("mad", null, "Madurese", "madourais", null));
+ Language4a.register(new Language4a("mag", null, "Magahi", "magahi", null));
+ Language4a.register(new Language4a("mah", "mh", "Marshallese", "marshall", null));
+ Language4a.register(new Language4a("mai", null, "Maithili", "maithili", null));
+ Language4a.register(new Language4a("mak", null, "Makasar", "makassar", null));
+ Language4a.register(new Language4a("mal", "ml", "Malayalam", "malayalam", null));
+ Language4a.register(new Language4a("man", null, "Mandingo", "mandingue", null));
+ Language4a.register(new Language4a("mao", "mi", "Maori", "maori", null));
Language4a.register(new Language4a(
- "map", null, "Austronesian(Other)", "malayo-polynésiennes, autres langues"));
- Language4a.register(new Language4a("mar", "mr", "Marathi", "marathe"));
- Language4a.register(new Language4a("mas", null, "Masai", "massaï"));
- Language4a.register(new Language4a("may", "ms", "Malay", "malais"));
- Language4a.register(new Language4a("mdf", null, "Moksha", "moksa"));
- Language4a.register(new Language4a("mdr", null, "Mandar", "mandar"));
- Language4a.register(new Language4a("men", null, "Mende", "mendé"));
- Language4a.register(new Language4a("mga", null, "Irish, Middle(900-1200)", "irlandais moyen(900-1200)"));
- Language4a.register(new Language4a("mic", null, "Mi'kmaq; Micmac", "mi'kmaq; micmac"));
- Language4a.register(new Language4a("min", null, "Minangkabau", "minangkabau"));
- Language4a.register(new Language4a("mis", null, "Miscellaneous languages", "diverses, langues"));
- Language4a.register(new Language4a("mkh", null, "Mon-Khmer(Other)", "môn-khmer, autres langues"));
- Language4a.register(new Language4a("mlg", "mg", "Malagasy", "malgache"));
- Language4a.register(new Language4a("mlt", "mt", "Maltese", "maltais"));
- Language4a.register(new Language4a("mnc", null, "Manchu", "mandchou"));
- Language4a.register(new Language4a("mni", null, "Manipuri", "manipuri"));
- Language4a.register(new Language4a("mno", null, "Manobo languages", " manobo, langues"));
- Language4a.register(new Language4a("moh", null, "Mohawk", "mohawk"));
- Language4a.register(new Language4a("mol", "mo", "Moldavian", "moldave"));
- Language4a.register(new Language4a("mon", "mn", "Mongolian", "mongol"));
- Language4a.register(new Language4a("mos", null, "Mossi", "moré"));
- Language4a.register(new Language4a("mul", null, "Multiple languages", "multilingue"));
- Language4a.register(new Language4a("mun", null, "Munda languages", "mounda, langues"));
- Language4a.register(new Language4a("mus", null, "Creek", "muskogee"));
- Language4a.register(new Language4a("mwl", null, "Mirandese", "mirandais"));
- Language4a.register(new Language4a("mwr", null, "Marwari", "marvari"));
- Language4a.register(new Language4a("myn", null, "Mayan languages", "maya, langues"));
- Language4a.register(new Language4a("myv", null, "Erzya", "erza"));
- Language4a.register(new Language4a("nah", null, "Nahuatl", "nahuatl"));
+ "map", null, "Austronesian(Other)", "malayo-polynésiennes, autres langues", null));
+ Language4a.register(new Language4a("mar", "mr", "Marathi", "marathe", null));
+ Language4a.register(new Language4a("mas", null, "Masai", "massaï", null));
+ Language4a.register(new Language4a("may", "ms", "Malay", "malais", null));
+ Language4a.register(new Language4a("mdf", null, "Moksha", "moksa", null));
+ Language4a.register(new Language4a("mdr", null, "Mandar", "mandar", null));
+ Language4a.register(new Language4a("men", null, "Mende", "mendé", null));
+ Language4a.register(new Language4a("mga", null, "Irish, Middle(900-1200)", "irlandais moyen(900-1200)", null));
+ Language4a.register(new Language4a("mic", null, "Mi'kmaq; Micmac", "mi'kmaq; micmac", null));
+ Language4a.register(new Language4a("min", null, "Minangkabau", "minangkabau", null));
+ Language4a.register(new Language4a("mis", null, "Miscellaneous languages", "diverses, langues", null));
+ Language4a.register(new Language4a("mkh", null, "Mon-Khmer(Other)", "môn-khmer, autres langues", null));
+ Language4a.register(new Language4a("mlg", "mg", "Malagasy", "malgache", null));
+ Language4a.register(new Language4a("mlt", "mt", "Maltese", "maltais", null));
+ Language4a.register(new Language4a("mnc", null, "Manchu", "mandchou", null));
+ Language4a.register(new Language4a("mni", null, "Manipuri", "manipuri", null));
+ Language4a.register(new Language4a("mno", null, "Manobo languages", " manobo, langues", null));
+ Language4a.register(new Language4a("moh", null, "Mohawk", "mohawk", null));
+ Language4a.register(new Language4a("mol", "mo", "Moldavian", "moldave", null));
+ Language4a.register(new Language4a("mon", "mn", "Mongolian", "mongol", null));
+ Language4a.register(new Language4a("mos", null, "Mossi", "moré", null));
+ Language4a.register(new Language4a("mul", null, "Multiple languages", "multilingue", null));
+ Language4a.register(new Language4a("mun", null, "Munda languages", "mounda, langues", null));
+ Language4a.register(new Language4a("mus", null, "Creek", "muskogee", null));
+ Language4a.register(new Language4a("mwl", null, "Mirandese", "mirandais", null));
+ Language4a.register(new Language4a("mwr", null, "Marwari", "marvari", null));
+ Language4a.register(new Language4a("myn", null, "Mayan languages", "maya, langues", null));
+ Language4a.register(new Language4a("myv", null, "Erzya", "erza", null));
+ Language4a.register(new Language4a("nah", null, "Nahuatl", "nahuatl", null));
Language4a.register(new Language4a(
- "nai", null, "North American Indian", "indiennes d'Amérique du Nord, autres langues"));
- Language4a.register(new Language4a("nap", null, "Neapolitan", "napolitain"));
- Language4a.register(new Language4a("nau", "na", "Nauru", "nauruan"));
- Language4a.register(new Language4a("nav", "nv", "Navajo; Navaho", "navaho"));
- Language4a.register(new Language4a("nbl", "nr", "Ndebele, South; South Ndebele", "ndébélé du Sud"));
- Language4a.register(new Language4a("nde", "nd", "Ndebele, North; North Ndebele", "ndébélé du Nord"));
- Language4a.register(new Language4a("ndo", "ng", "Ndonga", "ndonga"));
+ "nai", null, "North American Indian", "indiennes d'Amérique du Nord, autres langues", null));
+ Language4a.register(new Language4a("nap", null, "Neapolitan", "napolitain", null));
+ Language4a.register(new Language4a("nau", "na", "Nauru", "nauruan", null));
+ Language4a.register(new Language4a("nav", "nv", "Navajo; Navaho", "navaho", null));
+ Language4a.register(new Language4a("nbl", "nr", "Ndebele, South; South Ndebele", "ndébélé du Sud", null));
+ Language4a.register(new Language4a("nde", "nd", "Ndebele, North; North Ndebele", "ndébélé du Nord", null));
+ Language4a.register(new Language4a("ndo", "ng", "Ndonga", "ndonga", null));
Language4a.register(new Language4a(
"nds", null, "Low German; Low Saxon; German, Low; Saxon, Low",
- "bas allemand; bas saxon; allemand, bas; saxon, bas"));
- Language4a.register(new Language4a("nep", "ne", "Nepali", "népalais"));
- Language4a.register(new Language4a("new", null, "Newari; Nepal Bhasa", "newari; nepal bhasa"));
- Language4a.register(new Language4a("nia", null, "Nias", "nias"));
+ "bas allemand; bas saxon; allemand, bas; saxon, bas", null));
+ Language4a.register(new Language4a("nep", "ne", "Nepali", "népalais", null));
+ Language4a.register(new Language4a("new", null, "Newari; Nepal Bhasa", "newari; nepal bhasa", null));
+ Language4a.register(new Language4a("nia", null, "Nias", "nias", null));
Language4a.register(new Language4a(
- "nic", null, "Niger-Kordofanian(Other)", "nigéro-congolaises, autres langues"));
- Language4a.register(new Language4a("niu", null, "Niuean", "niué"));
+ "nic", null, "Niger-Kordofanian(Other)", "nigéro-congolaises, autres langues", null));
+ Language4a.register(new Language4a("niu", null, "Niuean", "niué", null));
Language4a.register(new Language4a(
- "nno", "nn", "Norwegian Nynorsk; Nynorsk, Norwegian", "norvégien nynorsk; nynorsk, norvégien"));
+ "nno", "nn", "Norwegian Nynorsk; Nynorsk, Norwegian", "norvégien nynorsk; nynorsk, norvégien", null));
Language4a.register(new Language4a(
- "nob", "nb", "Norwegian Bokmål; Bokmål, Norwegian", "norvégien bokmål; bokmål, norvégien"));
- Language4a.register(new Language4a("nog", null, "Nogai", "nogaï; nogay"));
- Language4a.register(new Language4a("non", null, "Norse, Old", "norrois, vieux"));
- Language4a.register(new Language4a("nor", "no", "Norwegian", "norvégien"));
- Language4a.register(new Language4a("nqo", null, "N'ko", "n'ko"));
- Language4a.register(new Language4a("nso", null, "Northern Sotho, Pedi; Sepedi", "sotho du Nord; pedi; sepedi"));
- Language4a.register(new Language4a("nub", null, "Nubian languages", "nubiennes, langues"));
+ "nob", "nb", "Norwegian Bokmål; Bokmål, Norwegian", "norvégien bokmål; bokmål, norvégien", null));
+ Language4a.register(new Language4a("nog", null, "Nogai", "nogaï; nogay", null));
+ Language4a.register(new Language4a("non", null, "Norse, Old", "norrois, vieux", null));
+ Language4a.register(new Language4a("nor", "no", "Norwegian", "norvégien", null));
+ Language4a.register(new Language4a("nqo", null, "N'ko", "n'ko", null));
+ Language4a.register(new Language4a("nso", null, "Northern Sotho, Pedi; Sepedi", "sotho du Nord; pedi; sepedi",
+ null));
+ Language4a.register(new Language4a("nub", nu...
[truncated message content] |
|
From: <vic...@us...> - 2022-06-18 17:26:47
|
Revision: 12661
http://sourceforge.net/p/foray/code/12661
Author: victormote
Date: 2022-06-18 17:26:44 +0000 (Sat, 18 Jun 2022)
Log Message:
-----------
Improvements to spell-checking.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-06-18 16:42:01 UTC (rev 12660)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-06-18 17:26:44 UTC (rev 12661)
@@ -28,9 +28,6 @@
package org.foray.orthography.util;
-import org.foray.common.i18n.Country4a;
-import org.foray.common.i18n.Language4a;
-import org.foray.common.i18n.Script4a;
import org.foray.common.i18n.WritingSystem4a;
import org.foray.common.primitive.ObjectUtils;
import org.foray.common.primitive.XmlUtils;
@@ -39,6 +36,7 @@
import org.foray.orthography.OrthographyServerConfig;
import org.foray.orthography.SegmentDictionary;
import org.foray.xml.SaxParser;
+import org.foray.xml.dtd.DtdAttribute;
import org.axsl.i18n.WritingSystem;
import org.axsl.orthography.Orthography;
@@ -101,7 +99,7 @@
private String qName;
/** The writing system specified in an xml:lang attribute for this element, if any. */
- private WritingSystem writingSystem;
+ private WritingSystem4a writingSystem;
/** The orthography configuration for this element, only if {@link #writingSystem} is not null. */
private Orthography4a orthographyConfig;
@@ -138,13 +136,18 @@
/** Command-line return status constant indicating that there was an error parsing the input file. */
public static final byte STATUS_PARSING_ERROR = 3;
+ /** The "xml:lang" attribute. */
+ private static final DtdAttribute XML_LANG_ATTRIBUTE = new DtdAttribute(XmlUtils.XML_NAMESPACE_URI, "lang");
+
/** The output stream to which the output should be sent. */
private PrintStream output;
-
/** The element stack. */
private Stack<Element> elementStack = new Stack<Element>();
+ /** The current writing system. */
+ private WritingSystem4a currentWritingSystem;
+
/** The current orthography configuration. */
private Orthography4a currentOrthographyConfig;
@@ -260,55 +263,47 @@
* @param element The element to which the {@link Orthography} instance should be attached.
*/
private void parseOrthography(final Attributes attributes, final Element element) {
- String languageAttr = null;
- languageAttr = attributes.getValue("xml:lang");
+ final String languageAttr = XML_LANG_ATTRIBUTE.getValue(attributes);
if (languageAttr == null) {
- languageAttr = attributes.getValue(XmlUtils.XML_NAMESPACE_URI, "lang");
- }
-
- if (languageAttr == null) {
if (this.currentOrthographyConfig == null) {
this.output.println("Orthography not specified. " + getLocationString(getLocator()));
}
+ return;
+ }
+
+// /* Is there a country code? */
+// final String[] languageAndCountry = languageAttr.split("-");
+// final String languageString = languageAndCountry[0];
+// String countryString = null;
+// if (languageAndCountry.length > 1) {
+// countryString = languageAndCountry[1];
+// }
+//
+// final Language4a language = Language4a.findFromAlpha(languageString);
+// final Country4a country = Country4a.findFromAlpha(countryString);
+// /* TODO: The following should not be hard-coded this way.
+// * Instead, either specify in the XML document (i.e. as an attribute on the element itself), or implied by
+// * the text content. */
+// final Script4a script = Script4a.LATIN;
+//
+// element.writingSystem = WritingSystem4a.find(language, script, country);
+ this.currentWritingSystem = WritingSystem4a.find(languageAttr);
+ element.writingSystem = this.currentWritingSystem;
+ if (element.writingSystem == null) {
+ final String message = String.format("Writing system not found for: %s", languageAttr);
+ this.output.println(message + getLocationString(getLocator()));
} else {
- /* Is there a country code? */
- final String[] languageAndCountry = languageAttr.split("-");
- final String languageString = languageAndCountry[0];
- String countryString = null;
- if (languageAndCountry.length > 1) {
- countryString = languageAndCountry[1];
- }
-
- final Language4a language = Language4a.findFromAlpha(languageString);
- final Country4a country = Country4a.findFromAlpha(countryString);
- /* TODO: The following should not be hard-coded this way.
- * Instead, either specify in the XML document (i.e. as an attribute on the element itself), or implied by
- * the text content. */
- final Script4a script = Script4a.LATIN;
-
- element.writingSystem = WritingSystem4a.find(language, script, country);
- if (element.writingSystem == null) {
- final String message = String.format(
- "Orthography not found. Language: %1$s, Country: %2$s, Script: %3$s ", languageString,
- countryString, script.getAlphaCode());
+ final Orthography4a config = this.server.getOrthography(element.writingSystem);
+ if (config == null) {
+ final String message = String.format("Unconfigured orthography: %s", languageAttr);
this.output.println(message + getLocationString(getLocator()));
} else {
- final Orthography4a config = this.server.getOrthography(element.writingSystem);
- if (config == null) {
- final String message = String.format(
- "Unconfigured orthography. Language: %1$s, Country: %2$s, Script: %3$s ",
- languageString, countryString, script.getAlphaCode());
- this.output.println(message + getLocationString(getLocator()));
- } else {
- element.orthographyConfig = config;
- }
- this.currentOrthographyConfig = config;
+ element.orthographyConfig = config;
}
-
+ this.currentOrthographyConfig = config;
}
}
-
@Override
public void endElement(final String uri, final String localName, final String qName) throws SAXException {
if (this.elementStack.size() < 1) {
@@ -339,10 +334,18 @@
if (element.matches(uri, localName, qName)) {
this.elementStack.pop();
- /* Recompute the current orthography configuration. */
+ /* Recompute the current writing system. */
final int last = this.elementStack.size() - 1;
for (int index = last; index > -1; index --) {
final Element testElement = this.elementStack.get(index);
+ if (testElement.writingSystem != null) {
+ this.currentWritingSystem = testElement.writingSystem;
+ break;
+ }
+ }
+ /* Recompute the current orthography configuration. */
+ for (int index = last; index > -1; index --) {
+ final Element testElement = this.elementStack.get(index);
if (testElement.orthographyConfig != null) {
this.currentOrthographyConfig = testElement.orthographyConfig;
break;
@@ -390,7 +393,9 @@
return;
}
- this.output.println("Not found: " + word + " " + getShortLocationString(getLocator()));
+ final String message = String.format("Not found: %s %s %s", word, getShortLocationString(getLocator()),
+ this.currentWritingSystem.toString());
+ this.output.println(message);
this.notFoundCounter ++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-18 16:42:04
|
Revision: 12660
http://sourceforge.net/p/foray/code/12660
Author: victormote
Date: 2022-06-18 16:42:01 +0000 (Sat, 18 Jun 2022)
Log Message:
-----------
Don't parse the text inside an ignored element.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-06-18 16:37:52 UTC (rev 12659)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-06-18 16:42:01 UTC (rev 12660)
@@ -233,6 +233,7 @@
/* Some elements, having no content, can be placed in the middle of a word, making it look like that word is
* two words. Ignore such elements. */
if (this.elementIgnoreList.contains(localName)) {
+ setTextParsingActive(false);
return;
}
@@ -316,6 +317,7 @@
/* Some elements, having no content, can be placed in the middle of a word, making it look like that word is
* two words. Ignore such elements. */
if (this.elementIgnoreList.contains(localName)) {
+ setTextParsingActive(true);
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-18 16:37:55
|
Revision: 12659
http://sourceforge.net/p/foray/code/12659
Author: victormote
Date: 2022-06-18 16:37:52 +0000 (Sat, 18 Jun 2022)
Log Message:
-----------
Improvements to writing system parsing.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
Added Paths:
-----------
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdAttribute.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -74,11 +74,13 @@
/** The length, in chars, of the 3-character code. */
private static final int PATTERN_3CHAR_LENGTH = 3;
- /** Regular expression pattern for matching a 2-character code. */
- private static final Pattern PATTERN_2CHAR = Pattern.compile("[A-Z]{2}");
+ /** Regular expression pattern for matching a 2-character code. BCP 47 specifies that the country code is
+ * case-insensitive. */
+ private static final Pattern PATTERN_2CHAR = Pattern.compile("[A-Za-z]{2}");
- /** Regular expression pattern for matching a 3-character code. */
- private static final Pattern PATTERN_3CHAR = Pattern.compile("[A-Z]{3}");
+ /** Regular expression pattern for matching a 3-character code. BCP 47 specifies that the country code is
+ * case-insensitive. */
+ private static final Pattern PATTERN_3CHAR = Pattern.compile("[A-Za-z]{3}");
/** The initial capacity of the data structures. */
private static final int INITIAL_CAPACITY = 300;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -105,11 +105,13 @@
/** The length, in chars, of the 3-character code. */
private static final int PATTERN_3CHAR_LENGTH = 3;
- /** Regular expression pattern for matching a 2-character code. */
- private static final Pattern PATTERN_2CHAR = Pattern.compile("[a-z]{2}");
+ /** Regular expression pattern for matching a 2-character code. BCP 47 specifies that the language code is
+ * case-insensitive. */
+ private static final Pattern PATTERN_2CHAR = Pattern.compile("[A-Za-z]{2}");
- /** Regular expression pattern for matching a 3-character code. */
- private static final Pattern PATTERN_3CHAR = Pattern.compile("[a-z]{3}");
+ /** Regular expression pattern for matching a 3-character code. BCP 47 specifies that the language code is
+ * case-insensitive. */
+ private static final Pattern PATTERN_3CHAR = Pattern.compile("[A-Za-z]{3}");
/** The initial capacity of the data structures. */
private static final int INITIAL_CAPACITY = 600;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -59,8 +59,9 @@
/** Constant return value for {@link #getIcu4jCode()}. */
private static final byte ICU4J_NOT_SUPPORTED = -2;
- /** Regular expression pattern for matching a script code. */
- private static final Pattern PATTERN = Pattern.compile("[A-Z][a-z]{3}");
+ /** Regular expression pattern for matching a script code. Although BCP 47 recommends a pattern of [A-Z][a-z]{3},
+ * it also indicates that the language tag components are case-insensitive. */
+ private static final Pattern PATTERN = Pattern.compile("[A-Za-z]{4}");
/** The initial size of the data structures. */
private static final int INITIAL_CAPACITY = 150;
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -174,40 +174,60 @@
/**
* Parses a "well-formed" standard language string into its language, country, and script components, and finds or
* creates an instance of this class for those components.
- * By "well-formed
- * @param comboString The standard language string to be parsed, which may also have country and script components.
+ * By "well-formed" is meant a language string that conforms to BCP 47.
+ * @param langtag The standard language string to be parsed, which may also have country and script components.
* @return The writing system for the given parameters.
+ * @see <a href="https://tools.ietf.org/search/bcp47">BCP (Best Current Practice) 47, Tags for Identifying
+ * Languages</a>
*/
- public static WritingSystem4a find(final String comboString) {
- if (comboString == null) {
+ public static WritingSystem4a find(final String langtag) {
+ if (langtag == null
+ || langtag.length() < 1) {
return null;
}
+ String subtag = null;
String language = null;
String country = null;
String script = null;
- final String[] components = comboString.split("-");
- for (int index = 0; index < components.length; index ++) {
- final String component = components[index];
- /* Don't throw an exception if duplicate parts are found, or if a given subtag does not match any of this
- * patterns. There are possible extended language subtags, regions subtags, variant subtags, extension
- * subtags, and private-use subtags that may use the same patterns. Since we are checking them in the
- * specified order (language, script, region/country), we should catch the correct value if it is there. */
- if (Language4a.matchesPattern(component)) {
- if (language == null) {
- language = component;
- }
- } else if (Country4a.matchesPattern(component)) {
- if (country == null) {
- country = component;
- }
- } else if (Script4a.matchesPattern(component)) {
- if (script == null) {
- script = component;
- }
+
+ final String[] subtags = langtag.split("-");
+
+ /* BCP 47 specifies that the subtags are case insensitive. The order and size of the tags give us the parsing
+ * clues. We only care about language, script, and country/region. */
+
+ int index = 0;
+ subtag = subtags[index];
+
+ /* The first subtag /must/ be a language. */
+ if (Language4a.matchesPattern(subtag)) {
+ language = subtag;
+ index ++;
+ if (index >= subtags.length) {
+ return find(language, script, country);
}
+ subtag = subtags[index];
+ } else {
+ throw new IllegalArgumentException("Language tag must start with 2- or 3-character code.");
}
- return find(language, country, script);
+
+ /* The script subtag is optional, but must come next if it exists. */
+ if (Script4a.matchesPattern(subtag)) {
+ script = subtag;
+ index ++;
+ if (index >= subtags.length) {
+ return find(language, script, country);
+ }
+ subtag = subtags[index];
+ }
+
+ /* The region (country) subtag is optional, but must come next if it exists. */
+ if (Country4a.matchesPattern(subtag)) {
+ country = subtag;
+ }
+
+ /* We don't need to parse any other subtags. */
+ return find(language, script, country);
}
@Override
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -83,15 +83,6 @@
/* String too short. */
Assert.assertFalse(Country4a.matches2CharacterPattern("A"));
-
- /* Wrong case. */
- Assert.assertFalse(Country4a.matches2CharacterPattern("aa"));
-
- /* Wrong case. */
- Assert.assertFalse(Country4a.matches2CharacterPattern("Aa"));
-
- /* Wrong case. */
- Assert.assertFalse(Country4a.matches2CharacterPattern("aA"));
}
/**
@@ -107,15 +98,6 @@
/* String too short. */
Assert.assertFalse(Country4a.matches3CharacterPattern("AA"));
-
- /* Wrong case. */
- Assert.assertFalse(Country4a.matches3CharacterPattern("Aaa"));
-
- /* Wrong case. */
- Assert.assertFalse(Country4a.matches3CharacterPattern("aAa"));
-
- /* Wrong case. */
- Assert.assertFalse(Country4a.matches3CharacterPattern("aaA"));
}
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -83,15 +83,6 @@
/* String too short. */
Assert.assertFalse(Language4a.matches2CharacterPattern("a"));
-
- /* Wrong case. */
- Assert.assertFalse(Language4a.matches2CharacterPattern("AA"));
-
- /* Wrong case. */
- Assert.assertFalse(Language4a.matches2CharacterPattern("aA"));
-
- /* Wrong case. */
- Assert.assertFalse(Language4a.matches2CharacterPattern("Aa"));
}
/**
@@ -107,15 +98,6 @@
/* String too short. */
Assert.assertFalse(Language4a.matches3CharacterPattern("aa"));
-
- /* Wrong case. */
- Assert.assertFalse(Language4a.matches3CharacterPattern("aAA"));
-
- /* Wrong case. */
- Assert.assertFalse(Language4a.matches3CharacterPattern("AaA"));
-
- /* Wrong case. */
- Assert.assertFalse(Language4a.matches3CharacterPattern("AAa"));
}
}
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2022-06-17 19:58:48 UTC (rev 12658)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -50,7 +50,7 @@
@Test
public void invalidPatternTest() {
try {
- new Script4a("VULC", (short) -999, "VulcanScript", "VulcánScript", (byte) -1, null);
+ new Script4a("VULCA", (short) -999, "VulcanScript", "VulcánScript", (byte) -1, null);
Assert.fail("Expected " + IllegalArgumentException.class.getName());
} catch (final IllegalArgumentException e) {
/* This is the expected case. Do nothing. */
@@ -70,15 +70,6 @@
/* String too short. */
Assert.assertFalse(Script4a.matchesPattern("Aaa"));
-
- /* Wrong case. */
- Assert.assertFalse(Script4a.matchesPattern("aAAA"));
-
- /* Wrong case. */
- Assert.assertFalse(Script4a.matchesPattern("AAaa"));
-
- /* Wrong case. */
- Assert.assertFalse(Script4a.matchesPattern("AAAa"));
}
}
Added: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2022 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.i18n;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests of {@link WritingSystem4a}.
+ */
+public class WritingSystem4aTests {
+
+ /**
+ * Tests of {@link WritingSystem4a#find(String)}.
+ */
+ @Test
+ public void findFromLanguageStringTests() {
+ /* 2-char, recommended case. */
+ WritingSystem4a out = WritingSystem4a.find("en-Latn-US");
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.USA);
+
+ /* 2-char, not recommended case. */
+ out = WritingSystem4a.find("EN-lATN-us");
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.USA);
+
+ /* 3-char, recommended case. */
+ out = WritingSystem4a.find("eng-Latn-USA");
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.USA);
+
+ /* 3-char, not recommended case. */
+ out = WritingSystem4a.find("ENG-lATN-usa");
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.USA);
+
+ out = WritingSystem4a.find("eng-Latn");
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.LATIN, Country4a.UNDETERMINED);
+
+ out = WritingSystem4a.find("eng-USA");
+ parsingAssertions(out, Language4a.ENGLISH, Script4a.UNDETERMINED, Country4a.USA);
+ }
+
+ /**
+ * Makes assertions about an object under test that was parsed using BCP 47.
+ * @param out The object under test.
+ * @param expectedLanguage The expected language.
+ * @param expectedScript The expected script.
+ * @param expectedCountry The expected country.
+ */
+ private void parsingAssertions(final WritingSystem4a out, final Language4a expectedLanguage,
+ final Script4a expectedScript, final Country4a expectedCountry) {
+ Assert.assertEquals(expectedLanguage, out.getLanguage());
+ Assert.assertEquals(expectedScript, out.getScript());
+ Assert.assertEquals(expectedCountry, out.getCountry());
+
+ }
+}
Property changes on: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/WritingSystem4aTests.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdAttribute.java
===================================================================
--- trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdAttribute.java (rev 0)
+++ trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdAttribute.java 2022-06-18 16:37:52 UTC (rev 12659)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2022 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.xml.dtd;
+
+import org.foray.common.primitive.StringUtils;
+
+import org.xml.sax.Attributes;
+
+/**
+ * An XML attribute.
+ */
+public class DtdAttribute {
+
+ /** The namespace of the attribute. */
+ private String namespaceUri;
+
+ /** The local name of the attribute. */
+ private String localName;
+
+ /**
+ * Constructor.
+ * @param namespaceUri The namespace of the attribute.
+ * @param localName The local name of the attribute.
+ */
+ public DtdAttribute(final String namespaceUri, final String localName) {
+ this.namespaceUri = namespaceUri;
+ this.localName = localName;
+ }
+
+ /**
+ * Constructor.
+ * @param qName The qualified name of the attribute.
+ */
+ public DtdAttribute(final String qName) {
+ if (qName.contains(":")) {
+ final String[] components = qName.split(":");
+ if (components.length != 2) {
+ throw new IllegalArgumentException("Expected 2 components, actual was " + components.length);
+ }
+ this.namespaceUri = components[0];
+ this.localName = components[1];
+ } else {
+ this.namespaceUri = StringUtils.EMPTY_STRING;
+ this.localName = qName;
+ }
+ }
+
+ /**
+ * Look up this attribute's value from an {@link Attributes} instance.
+ * @param attributes The parsed attributes in which we are looking for the value.
+ * @return The attribute value as a string, or null if the attribute is not in {@code attributes}.
+ */
+ public String getValue(final Attributes attributes) {
+ if (attributes == null) {
+ return null;
+ }
+ return attributes.getValue(this.namespaceUri, this.localName);
+ }
+
+}
Property changes on: trunk/foray/foray-xml/src/main/java/org/foray/xml/dtd/DtdAttribute.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-17 19:59:30
|
Revision: 12658
http://sourceforge.net/p/foray/code/12658
Author: victormote
Date: 2022-06-17 19:58:48 +0000 (Fri, 17 Jun 2022)
Log Message:
-----------
1. Rename country "999" resources to "ZZZ" to conform to pattern validation. 2. Rough in language resources for Latin, Italian, and French.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/orthographies/foray-orthography-config.xml
Added Paths:
-----------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ-archaic.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-ZZZ.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/fre-Latn-ZZZ.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/ita-Latn-ZZZ.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/lat-Latn-ZZZ.xml
Removed Paths:
-------------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999-archaic.dict.xml
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
Deleted: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999-archaic.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999-archaic.dict.xml 2022-06-17 19:51:18 UTC (rev 12657)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999-archaic.dict.xml 2022-06-17 19:58:48 UTC (rev 12658)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE axsl-dictionary
- PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
- "http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-
-<axsl-dictionary language="eng" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
-
-<w><t>hum-bleth</t></w>
-<w><t>lov-eth</t></w>
-<w><t>pre-ëm-i-nence</t></w>
-<w><t>pre-ëm-i-nent-ly</t><adverb/></w>
-<w><t>seek-est</t></w>
-<w><t>speak-eth</t></w>
-<w><t>walk-eth</t></w>
-
-</axsl-dictionary>
Deleted: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-17 19:51:18 UTC (rev 12657)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-17 19:58:48 UTC (rev 12658)
@@ -1,187252 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE axsl-dictionary
- PUBLIC "-//aXSL//DTD Dictionary V0.1//EN"
- "http://www.axsl.org/dtds/0.1/en/axsl-dictionary.dtd">
-
-<axsl-dictionary language="eng" script="Latn" hard-hyphen-char="="
- soft-hyphen-char="-">
-
-<!--
-# This original version of this file was downloaded by The FOray Project from
-# http://www.dcs.shef.ac.uk/research/ilash/Moby/mhyph.tar.Z
-# on September 28, 2010.
-# The link to this resource was found on this page:
-# http://icon.shef.ac.uk/Moby/
-# which includes the following text:
-#
-# <quote>
-# On June 1, 1996 Grady Ward announced that the fruits of the Moby project
-# were being placed in the public domain:
-#
-# The Moby lexicon project is complete and has
-# been place into the public domain. Use, sell,
-# rework, excerpt and use in any way on any platform.
-#
-# Placing this material on internal or public servers is
-# also encouraged. The compiler is not aware of any
-# export restrictions so freely distribute world-wide.
-#
-# You can verify the public domain status by contacting
-#
-# Grady Ward
-# 3449 Martha Ct.
-# Arcata, CA 95521-4884
-#
-# da...@my...
-# </quote>
-#
-# We have changed the encoding from MacRomanEncoding to UTF-8, changed the
-# hard- and soft-hyphenation characters, wrapped the content in XML tags,
-# and made many, many other changes.
-#
-#
-# It is desirable that the entries in this dictionary should be in
-# case-insensitive alphabetical order (actually Unicode code point order):
-# 1) alphabetical to assist human authors and users, and 2) case-insensitive to
-# keep similar words together, to clarify the effects of these similar words.
-#
-# No effort has (yet) been made by FOray to systematically correct errors or
-# omissions in this dictionary.
-# Use with caution.
-# If you detect an error or omissions, please either post a bug on the FOray
-# web site, or submit a patch request.
--->
-
-<w><t>&</t></w>
-<w><t>a</t></w>
-<phrase><t>a cap-pel-la</t></phrase>
-<phrase><t>a for-ti-o-ri</t></phrase>
-<phrase><t>a go-go</t></phrase>
-<phrase><t>a pos-te-ri-o-ri</t></phrase>
-<phrase><t>a pri-o-ri</t></phrase>
-<phrase><t>a tem-po</t></phrase>
-<w><t>a=plen-ty</t></w>
-<w><t>a-a</t></w>
-<w><t>Aa-chen</t></w>
-<w><t>Aal-borg</t></w>
-<w><t>Aa-le-sund</t></w>
-<w><t>aa-li-i</t></w>
-<w><t>Aal-to</t></w>
-<w><t>Aar-au</t></w>
-<w><t>aard-vark</t></w>
-<w><t>aard-wolf</t></w>
-<w><t>Aar-gau</t></w>
-<w><t>Aar-hus</t></w>
-<w><t>Aar-on</t></w>
-<phrase><t>Aa-ron's beard</t></phrase>
-<phrase><t>Aa-ron's rod</t></phrase>
-<w><t>Aa-ron's=beard</t></w>
-<w><t>Aa-ron-ic</t></w>
-<w><t>Aa-ron-i-cal</t></w>
-<w><t>Aa-ron-ite</t></w>
-<w><t>Aar-on-it-ic</t></w>
-<phrase><t>ab in-i-ti-o</t></phrase>
-<phrase><t>ab o-vo</t></phrase>
-<w><t>ab-a</t></w>
-<w><t>a-ba</t></w>
-<w><t>a-bac</t></w>
-<w><t>ab-a-ca</t></w>
-<w><t>a-ba-ca</t></w>
-<w><t>ab-a-ci</t></w>
-<w><t>ab-a-cis-ci</t></w>
-<w><t>ab-a-cis-cus</t></w>
-<w><t>ab-a-cist</t></w>
-<w><t>a-back</t></w>
-<w><t>Ab-a-co</t></w>
-<w><t>ab-ac-ti-nal</t></w>
-<w><t>a-bac-u-lus</t></w>
-<w><t>ab-a-cus</t></w>
-<w><t>ab-a-cus-es</t></w>
-<w><t>Ab-a-dan</t></w>
-<w><t>A-ba-dan</t></w>
-<w><t>A-bad-don</t></w>
-<w><t>a-baft</t></w>
-<w><t>A-bag-tha</t></w>
-<w><t>A-bai-lard</t></w>
-<w><t>a-baised</t></w>
-<w><t>A-ba-kan</t></w>
-<w><t>ab-a-lo-ne</t></w>
-<w><t>ab-amp</t></w>
-<w><t>ab-am-pere</t></w>
-<w><t>a-ban-don</t></w>
-<w><t>a-ban-don-a-ble</t></w>
-<w><t>a-ban-doned</t></w>
-<w><t>a-ban-doned-ly</t></w>
-<w><t>a-ban-don-ee</t></w>
-<w><t>a-ban-don-er</t></w>
-<w><t>a-ban-don-ment</t></w>
-<w><t>A-ban-tes</t></w>
-<w><t>ab-ap-tis-ton</t></w>
-<w><t>A-bar-bar-e-a</t></w>
-<w><t>Ab-a-ris</t></w>
-<w><t>A-bas</t></w>
-<w><t>a-base</t></w>
-<w><t>a-based</t></w>
-<w><t>a-base-ment</t></w>
-<w><t>a-bas-er</t></w>
-<w><t>a-bash</t></w>
-<w><t>a-bash-ed-ly</t></w>
-<w><t>a-bash-ed-ness</t></w>
-<w><t>a-bash-ment</t></w>
-<w><t>a-ba-sia</t></w>
-<w><t>a-ba-sic</t></w>
-<w><t>a-bas-ing</t></w>
-<w><t>a-bat-a-ble</t></w>
-<w><t>a-ba-tage</t></w>
-<w><t>a-bate</t></w>
-<w><t>a-bat-ed</t></w>
-<w><t>a-bate-ment</t></w>
-<w><t>a-bat-er</t></w>
-<w><t>a-bat-ing</t></w>
-<w><t>ab-a-tis</t></w>
-<w><t>a-bat-jour</t></w>
-<w><t>a-ba-tor</t></w>
-<w><t>a-bat-tage</t></w>
-<w><t>ab-at-tis</t></w>
-<w><t>ab-at-toir</t></w>
-<w><t>ab-ax-i-al</t></w>
-<w><t>abb</t></w>
-<w><t>ab-b</t></w>
-<w><t>Ab-ba</t></w>
-<w><t>ab-ba</t></w>
-<w><t>ab-ba-cy</t></w>
-<w><t>Ab-bai</t></w>
-<w><t>Ab-bas-id</t></w>
-<w><t>Ab-bas-sid</t></w>
-<w><t>Ab-bas-side</t></w>
-<w><t>ab-ba-tial</t></w>
-<w><t>Ab-be</t></w>
-<w><t>ab-bess</t></w>
-<w><t>Abbe-vil-e-an</t></w>
-<w><t>Ab-be-ville</t></w>
-<w><t>Abbe-vill-i-an</t></w>
-<w><t>Ab-bey</t></w>
-<w><t>ab-bey</t></w>
-<phrase><t>Ab-bey The-a-tre</t></phrase>
-<w><t>ab-bey-stead</t></w>
-<w><t>ab-bey-stede</t></w>
-<w><t>Ab-bie</t></w>
-<w><t>ab-bot</t></w>
-<w><t>Ab-bot</t></w>
-<w><t>ab-bot-cy</t></w>
-<w><t>Ab-bots-ford</t></w>
-<w><t>ab-bot-ship</t></w>
-<w><t>Ab-bott</t></w>
-<w><t>Ab-boud</t></w>
-<w><t>abbr</t></w>
-<w><t>abbrev</t></w>
-<w><t>ab-bre-vi-ate</t></w>
-<w><t>ab-bre-vi-at-ed</t></w>
-<w><t>ab-bre-vi-at-ing</t></w>
-<w><t>ab-bre-vi-a-tion</t></w>
-<w><t>ab-bre-vi-a-tor</t></w>
-<w><t>Ab-by</t></w>
-<w><t>ab-bé</t></w>
-<w><t>ab-bés</t></w>
-<w><t>ab-cou-lomb</t></w>
-<w><t>Abd=al=Ka-dir</t></w>
-<w><t>Abd=al=Rah-man</t></w>
-<w><t>Abd=el=Ka-dir</t></w>
-<w><t>Ab-der-hal-den</t></w>
-<w><t>Ab-de-rus</t></w>
-<w><t>Ab-di-as</t></w>
-<w><t>ab-di-ca-ble</t></w>
-<w><t>ab-di-cant</t></w>
-<w><t>ab-di-cate</t></w>
-<w><t>ab-di-cat-ed</t></w>
-<w><t>ab-di-cat-ing</t></w>
-<w><t>ab-di-ca-tion</t></w>
-<w><t>ab-di-ca-tive</t></w>
-<w><t>ab-di-ca-tor</t></w>
-<w><t>ab-do-men</t></w>
-<w><t>ab-dom-i-nal</t></w>
-<w><t>ab-dom-i-nal-ly</t></w>
-<w><t>ab-dom-i-nous</t></w>
-<w><t>Ab-don</t></w>
-<w><t>ab-duce</t></w>
-<w><t>ab-duced</t></w>
-<w><t>ab-du-cens</t></w>
-<phrase><t>ab-du-cens nerve</t></phrase>
-<w><t>ab-du-cent</t></w>
-<w><t>ab-du-cen-tes</t></w>
-<w><t>ab-duc-ing</t></w>
-<w><t>ab-duct</t></w>
-<w><t>ab-duc-tion</t></w>
-<w><t>ab-duc-tor</t></w>
-<w><t>Ab-dul=A-ziz</t></w>
-<phrase><t>Ab-dul=Ha-mid II</t></phrase>
-<w><t>a-beam</t></w>
-<w><t>a-be-ce-dar-i-a</t></w>
-<w><t>a-be-ce-dar-i-an</t></w>
-<w><t>a-be-ce-dar-i-um</t></w>
-<w><t>a-be-ce-da-ry</t></w>
-<w><t>a-bed</t></w>
-<w><t>A-bed-ne-go</t></w>
-<w><t>A-bel</t></w>
-<w><t>A-bel=me-ho-lah</t></w>
-<w><t>Ab-e-lard</t></w>
-<w><t>a-bele</t></w>
-<w><t>A-be-li-an</t></w>
-<phrase><t>A-be-li-an group</t></phrase>
-<w><t>a-bel-mosk</t></w>
-<w><t>A-be-nez-ra</t></w>
-<w><t>Ab-e-o-ku-ta</t></w>
-<w><t>A-be-o-ku-ta</t></w>
-<w><t>Ab-er-crom-bie</t></w>
-<w><t>Ab-er-dare</t></w>
-<w><t>Ab-er-deen</t></w>
-<phrase><t>Ab-er-deen An-gus</t></phrase>
-<w><t>Ab-er-deen-shire</t></w>
-<w><t>Ab-er-do-ni-an</t></w>
-<w><t>A-ber-glau-be</t></w>
-<w><t>ab-er-neth-y</t></w>
-<w><t>ab-er-rance</t></w>
-<w><t>ab-er-ran-cy</t></w>
-<w><t>ab-er-rant</t></w>
-<w><t>ab-er-ra-tion</t></w>
-<w><t>ab-er-ra-tion-al</t></w>
-<w><t>Ab-er-yst-wyth</t></w>
-<w><t>ab-es-se</t></w>
-<w><t>ab-es-sive</t></w>
-<w><t>a-bet</t></w>
-<w><t>a-bet-ment</t></w>
-<w><t>a-bet-tal</t></w>
-<w><t>a-bet-ted</t></w>
-<w><t>a-bet-ter</t></w>
-<w><t>a-bet-ting</t></w>
-<w><t>a-bet-tor</t></w>
-<w><t>a-bey-ance</t></w>
-<w><t>a-bey-ant</t></w>
-<w><t>ab-far-ad</t></w>
-<w><t>Ab-ga-tha</t></w>
-<w><t>ab-hen-ry</t></w>
-<w><t>ab-hom-i-na-ble</t></w>
-<w><t>ab-hor</t></w>
-<w><t>ab-horred</t></w>
-<w><t>ab-hor-rence</t></w>
-<w><t>ab-hor-rent</t></w>
-<w><t>ab-hor-rent-ly</t></w>
-<w><t>ab-hor-rer</t></w>
-<w><t>ab-hor-ring</t></w>
-<w><t>Ab-i-a</t></w>
-<w><t>A-bi-a-thar</t></w>
-<w><t>A-bib</t></w>
-<w><t>a-bid-ance</t></w>
-<w><t>a-bide</t></w>
-<w><t>a-bid-ed</t></w>
-<w><t>a-bid-er</t></w>
-<w><t>a-bid-ing</t></w>
-<w><t>a-bid-ing-ly</t></w>
-<w><t>a-bid-ing-ness</t></w>
-<w><t>Ab-i-djan</t></w>
-<w><t>A-bid-jan</t></w>
-<w><t>A-bie</t></w>
-<w><t>ab-i-ent</t></w>
-<w><t>ab-i-e-tate</t></w>
-<phrase><t>ab-i-et-ic ac-id</t></phrase>
-<w><t>ab-i-gail</t></w>
-<w><t>Ab-i-gail</t></w>
-<w><t>A-bi-hu</t></w>
-<w><t>Ab-i-lene</t></w>
-<w><t>a-bil-i-ty</t></w>
-<w><t>Ab-i-lyne</t></w>
-<w><t>A-bim-e-lech</t></w>
-<w><t>A-bi-ne-ri</t></w>
-<w><t>Ab-ing-don</t></w>
-<w><t>Ab-ing-ger</t></w>
-<w><t>Ab-ing-ton</t></w>
-<w><t>A-bin-o-am</t></w>
-<w><t>A-bin-o-em</t></w>
-<w><t>a-bi-o-gen-e-sis</t></w>
-<w><t>a-bi-o-ge-net-ic</t></w>
-<w><t>a-bi-o-ge-net-i-cal</t></w>
-<w><t>a-bi-o-ge-net-i-cal-ly</t></w>
-<w><t>a-bi-og-e-nist</t></w>
-<w><t>a-bi-o-sis</t></w>
-<w><t>a-bi-ot-ic</t></w>
-<w><t>a-bi-ot-i-cal</t></w>
-<w><t>a-bi-ot-i-cal-ly</t></w>
-<w><t>ab-i-o-troph-ic</t></w>
-<w><t>ab-i-ot-ro-phy</t></w>
-<w><t>ab-ir-ri-tant</t></w>
-<w><t>ab-ir-ri-tate</t></w>
-<w><t>ab-ir-ri-tat-ed</t></w>
-<w><t>ab-ir-ri-tat-ing</t></w>
-<w><t>ab-ir-ri-ta-tion</t></w>
-<w><t>ab-ir-ri-ta-tive</t></w>
-<w><t>Ab-i-sag</t></w>
-<w><t>Ab-i-shag</t></w>
-<w><t>A-bi-u</t></w>
-<w><t>ab-ject</t></w>
-<w><t>ab-ject-ed-ness</t></w>
-<w><t>ab-jec-tion</t></w>
-<w><t>ab-jec-tive</t></w>
-<w><t>ab-ject-ly</t></w>
-<w><t>ab-ject-ness</t></w>
-<w><t>ab-junc-tion</t></w>
-<w><t>ab-ju-ra-tion</t></w>
-<w><t>ab-jur-a-to-ry</t></w>
-<w><t>ab-jure</t></w>
-<w><t>ab-jured</t></w>
-<w><t>ab-jur-er</t></w>
-<w><t>ab-jur-ing</t></w>
-<w><t>Ab-kha-si-a</t></w>
-<w><t>Ab-kha-si-an</t></w>
-<w><t>Ab-khaz</t></w>
-<w><t>Ab-kha-zi-a</t></w>
-<w><t>Ab-kha-zi-an</t></w>
-<w><t>abl</t></w>
-<w><t>ab-lac-tate</t></w>
-<w><t>ab-lac-tat-ed</t></w>
-<w><t>ab-lac-tat-ing</t></w>
-<w><t>ab-lac-ta-tion</t></w>
-<w><t>ab-late</t></w>
-<w><t>ab-lat-ed</t></w>
-<w><t>ab-lat-ing</t></w>
-<w><t>ab-la-tion</t></w>
-<w><t>ab-la-ti-val</t></w>
-<w><t>ab-la-tive</t></w>
-<phrase><t>ab-la-tive ab-so-lute</t></phrase>
-<w><t>ab-la-tor</t></w>
-<w><t>ab-laut</t></w>
-<w><t>a-blaze</t></w>
-<w><t>a-ble</t></w>
-<phrase><t>a-ble rat-ing</t></phrase>
-<w><t>a-ble=bod-ied</t></w>
-<phrase><t>a-ble=bod-ied sea-man</t></phrase>
-<w><t>a-ble=bod-ied-ness</t></w>
-<w><t>ab-le-gate</t></w>
-<w><t>a-bleph-a-rous</t></w>
-<w><t>a-blep-si-a</t></w>
-<w><t>a-blep-sy</t></w>
-<w><t>a-blep-ti-cal</t></w>
-<w><t>a-blep-ti-cal-ly</t></w>
-<w><t>a-bler</t></w>
-<w><t>a-blest</t></w>
-<w><t>a-blings</t></w>
-<w><t>a-blins</t></w>
-<w><t>a-block</t></w>
-<w><t>a-bloom</t></w>
-<w><t>ab-lu-ent</t></w>
-<w><t>a-blush</t></w>
-<w><t>ab-lu-tion</t></w>
-<w><t>ab-lu-tion-ar-y</t></w>
-<w><t>a-bly</t></w>
-<w><t>ab-mho</t></w>
-<w><t>ab-mo-dal-i-ty</t></w>
-<w><t>Ab-na-ki</t></w>
-<w><t>ab-ne-gate</t></w>
-<w><t>ab-ne-gat-ed</t></w>
-<w><t>ab-ne-gat-ing</t></w>
-<w><t>ab-ne-ga-tion</t></w>
-<w><t>ab-ne-ga-tor</t></w>
-<w><t>Ab-ner</t></w>
-<phrase><t>Ab-ney lev-el</t></phrase>
-<w><t>ab-nor-mal</t></w>
-<phrase><t>ab-nor-mal psy-chol-o-gy</t></phrase>
-<w><t>ab-nor-mal-cy</t></w>
-<w><t>ab-nor-mal-ise</t></w>
-<w><t>ab-nor-mal-ised</t></w>
-<w><t>ab-nor-mal-is-ing</t></w>
-<w><t>ab-nor-mal-i-ty</t></w>
-<w><t>ab-nor-mal-ize</t></w>
-<w><t>ab-nor-mal-ized</t></w>
-<w><t>ab-nor-mal-iz-ing</t></w>
-<w><t>ab-nor-mal-ly</t></w>
-<w><t>ab-nor-mal-ness</t></w>
-<w><t>ab-nor-mi-ty</t></w>
-<w><t>ab-o</t></w>
-<w><t>Ab-o</t></w>
-<w><t>a-board</t></w>
-<w><t>a-board-age</t></w>
-<w><t>a-bode</t></w>
-<w><t>ab-ohm</t></w>
-<w><t>a-boi-deau</t></w>
-<w><t>a-boi-teau</t></w>
-<w><t>a-bol-ish</t></w>
-<w><t>a-bol-ish-a-ble</t></w>
-<w><t>a-bol-ish-er</t></w>
-<w><t>a-bol-ish-ment</t></w>
-<w><t>ab-o-li-tion</t></w>
-<w><t>ab-o-li-tion-ar-y</t></w>
-<w><t>ab-o-li-tion-ise</t></w>
-<w><t>ab-o-li-tion-ised</t></w>
-<w><t>ab-o-li-tion-is-ing</t></w>
-<w><t>ab-o-li-tion-ism</t></w>
-<w><t>ab-o-li-tion-ist</t></w>
-<w><t>ab-o-li-tion-ize</t></w>
-<w><t>ab-o-li-tion-ized</t></w>
-<w><t>ab-o-li-tion-iz-ing</t></w>
-<w><t>a-bol-la</t></w>
-<w><t>a-bol-lae</t></w>
-<w><t>ab-o-ma-sum</t></w>
-<w><t>ab-o-ma-sus</t></w>
-<w><t>a-bom-i-na-ble</t></w>
-<phrase><t>a-bom-i-na-ble snow-man</t></phrase>
-<w><t>a-bom-i-na-ble-ness</t></w>
-<w><t>a-bom-i-na-bly</t></w>
-<w><t>a-bom-i-nate</t></w>
-<w><t>a-bom-i-nat-ed</t></w>
-<w><t>a-bom-i-nat-ing</t></w>
-<w><t>a-bom-i-na-tion</t></w>
-<w><t>a-bom-i-na-tor</t></w>
-<w><t>a-bon-dance</t></w>
-<w><t>a-boon</t></w>
-<w><t>ab-o-rad</t></w>
-<w><t>ab-o-ral</t></w>
-<w><t>Ab-o-rig-i-nal</t></w>
-<w><t>ab-o-rig-i-nal</t></w>
-<w><t>ab-o-rig-i-nal-i-ty</t></w>
-<w><t>ab-o-rig-i-nal-ly</t></w>
-<w><t>Ab-o-rig-i-ne</t></w>
-<w><t>ab-o-rig-i-ne</t></w>
-<w><t>a-born-ing</t></w>
-<w><t>a-bort</t></w>
-<w><t>a-bor-ti-cide</t></w>
-<w><t>a-bor-ti-fa-cient</t></w>
-<w><t>a-bor-tion</t></w>
-<w><t>a-bor-tion-al</t></w>
-<w><t>a-bor-tion-ist</t></w>
-<w><t>a-bor-tive</t></w>
-<w><t>a-bor-tive-ly</t></w>
-<w><t>a-bor-tive-ness</t></w>
-<w><t>a-bor-tus</t></w>
-<w><t>a-bor-tus-es</t></w>
-<w><t>ab-os</t></w>
-<w><t>a-bou-dik-ro</t></w>
-<w><t>a-bought</t></w>
-<w><t>A-bou-kir</t></w>
-<phrase><t>Aboukir Bay</t></phrase>
-<w><t>a-bou-li-a</t></w>
-<w><t>a-bou-lic</t></w>
-<w><t>a-bound</t></w>
-<w><t>a-bound-ing-ly</t></w>
-<w><t>a-bout</t></w>
-<w><t>a-bout=face</t></w>
-<w><t>a-bout=ship</t></w>
-<w><t>a-bove</t></w>
-<phrase><t>a-bove board</t></phrase>
-<w><t>a-bove-board</t></w>
-<w><t>a-bove-ground</t></w>
-<w><t>a-box</t></w>
-<w><t>abp</t></w>
-<w><t>abr</t></w>
-<w><t>ab-ra-ca-dab-ra</t></w>
-<w><t>a-bra-dant</t></w>
-<w><t>a-brade</t></w>
-<w><t>a-brad-ed</t></w>
-<w><t>a-brad-er</t></w>
-<w><t>a-brad-ing</t></w>
-<w><t>A-bra-ham</t></w>
-<w><t>A-bram</t></w>
-<w><t>a-bran-chi-al</t></w>
-<w><t>a-bran-chi-ate</t></w>
-<w><t>a-bra-ser</t></w>
-<w><t>a-bra-sion</t></w>
-<w><t>a-bra-sive</t></w>
-<w><t>a-brax-as</t></w>
-<w><t>a-bra-zo</t></w>
-<w><t>ab-re-act</t></w>
-<w><t>ab-re-ac-tion</t></w>
-<w><t>a-breast</t></w>
-<w><t>a-bri</t></w>
-<w><t>a-bridg-a-ble</t></w>
-<w><t>a-bridge</t></w>
-<w><t>a-bridge-a-ble</t></w>
-<w><t>a-bridged</t></w>
-<w><t>a-bridge-ment</t></w>
-<w><t>a-bridg-er</t></w>
-<w><t>a-bridg-ing</t></w>
-<w><t>a-bridg-ment</t></w>
-<w><t>a-bris</t></w>
-<w><t>a-broach</t></w>
-<w><t>a-broad</t></w>
-<w><t>ab-ro-ga-ble</t></w>
-<w><t>ab-ro-gate</t></w>
-<w><t>ab-ro-gat-ed</t></w>
-<w><t>ab-ro-gat-ing</t></w>
-<w><t>ab-ro-ga-tion</t></w>
-<w><t>ab-ro-ga-tive</t></w>
-<w><t>ab-ro-ga-tor</t></w>
-<w><t>ab-rupt</t></w>
-<w><t>ab-rup-tion</t></w>
-<w><t>ab-rupt-ly</t></w>
-<w><t>ab-rupt-ness</t></w>
-<w><t>A-bruz-zi</t></w>
-<w><t>Ab-sa-lom</t></w>
-<w><t>ab-scess</t></w>
-<w><t>ab-scessed</t></w>
-<w><t>ab-scind</t></w>
-<w><t>ab-scise</t></w>
-<w><t>ab-scised</t></w>
-<w><t>ab-scis-ing</t></w>
-<w><t>ab-scis-sa</t></w>
-<w><t>ab-scis-sae</t></w>
-<w><t>ab-scis-sas</t></w>
-<w><t>ab-scis-sion</t></w>
-<phrase><t>ab-scis-sion lay-er</t></phrase>
-<w><t>ab-scond</t></w>
-<w><t>ab-scond-er</t></w>
-<w><t>Ab-se-con</t></w>
-<w><t>ab-seil</t></w>
-<w><t>ab-sence</t></w>
-<w><t>ab-sent</t></w>
-<phrase><t>ab-sent with-out leave</t></phrase>
-<w><t>ab-sent=mind-ed</t></w>
-<w><t>ab-sent=mind-ed-ness</t></w>
-<w><t>ab-sen-ta-tion</t></w>
-<phrase><t>ab-sen-te re-o</t></phrase>
-<w><t>ab-sen-tee</t></w>
-<phrase><t>ab-sen-tee land-lord</t></phrase>
-<w><t>ab-sen-tee-ism</t></w>
-<w><t>ab-sent-er</t></w>
-<w><t>ab-sen-ti-a</t></w>
-<w><t>ab-sent-ly</t></w>
-<w><t>ab-sent-mind-ed-ly</t></w>
-<w><t>ab-sent-ness</t></w>
-<w><t>absinth</t></w>
-<w><t>ab-sinth</t></w>
-<w><t>ab-sinthe</t></w>
-<w><t>ab-sin-thi-al</t></w>
-<w><t>ab-sin-thi-an</t></w>
-<w><t>ab-sinth-ism</t></w>
-<phrase><t>ab-sit o-men</t></phrase>
-<w><t>Ab-so-lute</t></w>
-<w><t>ab-so-lute</t></w>
-<phrase><t>ab-so-lute al-co-hol</t></phrase>
-<phrase><t>ab-so-lute ceil-ing</t></phrase>
-<phrase><t>ab-so-lute hu-mid-i-ty</t></phrase>
-<phrase><t>ab-so-lute mag-ni-tude</t></phrase>
-<phrase><t>ab-so-lute ma-jor-i-ty</t></phrase>
-<phrase><t>ab-so-lute mon-ar-chy</t></phrase>
-<phrase><t>ab-so-lute mu-sic</t></phrase>
-<phrase><t>ab-so-lute pitch</t></phrase>
-<phrase><t>ab-so-lute tem-per-a-ture</t></phrase>
-<phrase><t>ab-so-lute u-nit</t></phrase>
-<phrase><t>ab-so-lute val-ue</t></phrase>
-<phrase><t>ab-so-lute vis-cos-i-ty</t></phrase>
-<phrase><t>ab-so-lute ze-ro</t></phrase>
-<w><t>ab-so-lute-ly</t></w>
-<w><t>ab-so-lute-ness</t></w>
-<w><t>ab-so-lu-tion</t></w>
-<w><t>ab-so-lut-ism</t></w>
-<w><t>ab-so-lut-ist</t></w>
-<w><t>ab-so-lu-tis-tic</t></w>
-<w><t>ab-so-lu-tis-ti-cal-ly</t></w>
-<w><t>ab-sol-u-to-ry</t></w>
-<w><t>ab-solv-a-ble</t></w>
-<w><t>ab-solve</t></w>
-<w><t>ab-solved</t></w>
-<w><t>ab-sol-vent</t></w>
-<w><t>ab-solv-er</t></w>
-<w><t>ab-solv-ing</t></w>
-<w><t>ab-so-nant</t></w>
-<w><t>ab-sorb</t></w>
-<w><t>ab-sorb-a-bil-i-ty</t></w>
-<w><t>ab-sorb-a-ble</t></w>
-<w><t>ab-sorb-ance</t></w>
-<w><t>ab-sorbed</t></w>
-<w><t>ab-sorb-ed-ly</t></w>
-<w><t>ab-sorb-ed-ness</t></w>
-<w><t>ab-sor-be-fa-cient</t></w>
-<w><t>ab-sorb-en-cy</t></w>
-<w><t>ab-sorb-ent</t></w>
-<phrase><t>ab-sorb-ent cot-ton</t></phrase>
-<w><t>ab-sorb-er</t></w>
-<w><t>ab-sorb-ing</t></w>
-<w><t>ab-sorb-ing-ly</t></w>
-<w><t>ab-sorp-tance</t></w>
-<w><t>ab-sorp-ti-om-e-ter</t></w>
-<w><t>ab-sorp-ti-o-met-ric</t></w>
-<w><t>ab-sorp-tion</t></w>
-<phrase><t>ab-sorp-tion spec-trum</t></phrase>
-<w><t>ab-sorp-tive</t></w>
-<w><t>ab-sorp-tive-ness</t></w>
-<w><t>ab-sorp-tiv-i-ty</t></w>
-<w><t>ab-squat-u-late</t></w>
-<w><t>ab-stain</t></w>
-<w><t>ab-stain-er</t></w>
-<w><t>ab-ste-mi-ous</t></w>
-<w><t>ab-ste-mi-ous-ly</t></w>
-<w><t>ab-ste-mi-ous-ness</t></w>
-<w><t>ab-sten-tion</t></w>
-<w><t>ab-sten-tious</t></w>
-<w><t>ab-sterge</t></w>
-<w><t>ab-sterged</t></w>
-<w><t>ab-ster-gent</t></w>
-<w><t>ab-sterg-ing</t></w>
-<w><t>ab-ster-sion</t></w>
-<w><t>ab-ster-sive</t></w>
-<w><t>ab-ster-sive-ness</t></w>
-<w><t>ab-sti-nence</t></w>
-<w><t>ab-sti-nen-cy</t></w>
-<w><t>ab-sti-nent</t></w>
-<w><t>ab-sti-nent-ly</t></w>
-<w><t>ab-stract</t></w>
-<phrase><t>ab-stract ex-pres-sion-ism</t></phrase>
-<phrase><t>ab-stract noun</t></phrase>
-<phrase><t>ab-stract of ti-tle</t></phrase>
-<w><t>ab-stract-ed</t></w>
-<w><t>ab-stract-ed-ly</t></w>
-<w><t>ab-stract-ed-ness</t></w>
-<w><t>ab-stract-er</t></w>
-<w><t>ab-strac-tion</t></w>
-<w><t>ab-strac-tion-al</t></w>
-<w><t>ab-strac-tion-ism</t></w>
-<w><t>ab-strac-tion-ist</t></w>
-<w><t>ab-strac-tive</t></w>
-<w><t>ab-strac-tive-ly</t></w>
-<w><t>ab-strac-tive-ness</t></w>
-<w><t>ab-stract-ly</t></w>
-<w><t>ab-stract-ness</t></w>
-<w><t>ab-stric-tion</t></w>
-<w><t>ab-struse</t></w>
-<w><t>ab-struse-ly</t></w>
-<w><t>ab-struse-ness</t></w>
-<w><t>ab-stru-si-ty</t></w>
-<w><t>ab-surd</t></w>
-<w><t>ab-surd-i-ty</t></w>
-<w><t>ab-surd-ly</t></w>
-<w><t>ab-surd-ness</t></w>
-<w><t>Ab-syr-tus</t></w>
-<phrase><t>Ab-u Dha-bi</t></phrase>
-<phrase><t>Ab-u Sim-bel</t></phrase>
-<w><t>A-bu=Bakr</t></w>
-<w><t>A-bu=Bekr</t></w>
-<w><t>A-bu-kir</t></w>
-<phrase><t>A-bu-kir Bay</t></phrase>
-<w><t>A-bul-fe-da</t></w>
-<w><t>a-bu-li-a</t></w>
-<w><t>a-bu-lic</t></w>
-<w><t>A-bu-na</t></w>
-<w><t>a-bun-dance</t></w>
-<w><t>a-bun-dant</t></w>
-<w><t>a-bun-dant-ly</t></w>
-<w><t>a-bu-ra</t></w>
-<w><t>A-bur-y</t></w>
-<w><t>a-bus-a-ble</t></w>
-<w><t>a-bus-age</t></w>
-<w><t>a-buse</t></w>
-<w><t>a-bused</t></w>
-<w><t>a-bus-er</t></w>
-<w><t>a-bus-ing</t></w>
-<w><t>a-bu-sive</t></w>
-<w><t>a-bu-sive-ly</t></w>
-<w><t>a-bu-sive-ness</t></w>
-<w><t>a-but</t></w>
-<w><t>a-bu-ti-lon</t></w>
-<w><t>a-but-ment</t></w>
-<w><t>a-but-tal</t></w>
-<w><t>a-but-tals</t></w>
-<w><t>a-but-ted</t></w>
-<w><t>a-but-ter</t></w>
-<w><t>a-but-ting</t></w>
-<w><t>a-buzz</t></w>
-<w><t>ab-volt</t></w>
-<w><t>ab-watt</t></w>
-<w><t>a-by</t></w>
-<w><t>A-by-dos</t></w>
-<w><t>a-bye</t></w>
-<w><t>Ab-y-la</t></w>
-<w><t>a-bysm</t></w>
-<w><t>a-bys-mal</t></w>
-<w><t>a-bys-mal-ly</t></w>
-<w><t>a-byss</t></w>
-<w><t>a-byss-al</t></w>
-<w><t>a-bys-sal</t></w>
-<w><t>Ab-ys-sin-i-a</t></w>
-<w><t>Ab-ys-sin-i-an</t></w>
-<phrase><t>Ab-ys-sin-i-an cat</t></phrase>
-<w><t>Ab-é-lard</t></w>
-<w><t>ac=glob-u-lin</t></w>
-<w><t>A-ca-cal-lis</t></w>
-<w><t>a-ca-cia</t></w>
-<w><t>ac-a-deme</t></w>
-<w><t>ac-a-dem-i-a</t></w>
-<w><t>ac-a-de-mi-a</t></w>
-<w><t>ac-a-dem-ic</t></w>
-<phrase><t>ac-a-dem-ic dress</t></phrase>
-<w><t>ac-a-dem-i-cal</t></w>
-<w><t>ac-a-dem-i-cal-ly</t></w>
-<w><t>ac-a-dem-i-cals</t></w>
-<w><t>a-cad-e-mi-cian</t></w>
-<w><t>ac-a-dem-i-cism</t></w>
-<w><t>a-cad-e-mise</t></w>
-<w><t>a-cad-e-mised</t></w>
-<w><t>a-cad-e-mis-ing</t></w>
-<w><t>a-cad-e-mism</t></w>
-<w><t>a-cad-e-mize</t></w>
-<w><t>Ac-a-de-mus</t></w>
-<w><t>a-cad-e-my</t></w>
-<w><t>A-cad-e-my</t></w>
-<w><t>A-ca-di-a</t></w>
-<w><t>A-ca-di-an</t></w>
-<w><t>A-ca-die</t></w>
-<w><t>ac-a-jou</t></w>
-<w><t>a-cal-cu-li-a</t></w>
-<w><t>ac-a-leph</t></w>
-<w><t>ac-a-lephe</t></w>
-<w><t>Ac-a-mas</t></w>
-<w><t>ac-an-tha-ceous</t></w>
-<w><t>a-can-thi</t></w>
-<w><t>a-can-thine</t></w>
-<w><t>a-can-thite</t></w>
-<w><t>a-can-tho-car-pous</t></w>
-<w><t>a-can-tho-ceph-a-lan</t></w>
-<w><t>ac-an-thoc-la-dous</t></w>
-<w><t>ac-an-tho-di-an</t></w>
-<w><t>a-can-thoid</t></w>
-<w><t>ac-an-thop-ter-yg-i-an</t></w>
-<w><t>ac-an-tho-sis</t></w>
-<w><t>ac-an-thot-ic</t></w>
-<w><t>a-can-thous</t></w>
-<w><t>a-can-thus</t></w>
-<w><t>a-can-thus-es</t></w>
-<w><t>a-cap-ni-a</t></w>
-<w><t>a-cap-ni-al</t></w>
-<w><t>a-cap-pel-la</t></w>
-<w><t>A-ca-pul-co</t></w>
-<w><t>a-car-di-a</t></w>
-<w><t>a-car-di-ac</t></w>
-<w><t>ac-a-ri</t></w>
-<w><t>ac-a-ri-a-sis</t></w>
-<w><t>a-car-i-cid-al</t></w>
-<w><t>a-car-i-cide</t></w>
-<w><t>ac-a-rid</t></w>
-<w><t>a-car-i-dan</t></w>
-<w><t>ac-a-rine</t></w>
-<w><t>A-car-nan</t></w>
-<w><t>ac-a-roid</t></w>
-<phrase><t>ac-a-roid gum</t></phrase>
-<w><t>ac-a-rol-o-gist</t></w>
-<w><t>ac-a-rol-o-gy</t></w>
-<w><t>ac-a-ro-pho-bi-a</t></w>
-<w><t>a-car-pel-lous</t></w>
-<w><t>a-car-pel-ous</t></w>
-<w><t>a-car-pous</t></w>
-<w><t>ac-a-rus</t></w>
-<w><t>A-cas-tus</t></w>
-<w><t>a-cat-a-lec-tic</t></w>
-<w><t>a-cau-dal</t></w>
-<w><t>a-cau-date</t></w>
-<w><t>ac-au-les-cence</t></w>
-<w><t>ac-au-les-cent</t></w>
-<w><t>a-cau-les-cent</t></w>
-<w><t>a-cau-line</t></w>
-<w><t>Ac-cad</t></w>
-<w><t>Ac-ca-di-an</t></w>
-<w><t>ac-cede</t></w>
-<w><t>ac-ced-ed</t></w>
-<w><t>ac-ced-ence</t></w>
-<w><t>ac-ced-er</t></w>
-<w><t>ac-ced-ing</t></w>
-<w><t>ac-cel-er-a-ble</t></w>
-<w><t>ac-cel-er-an-do</t></w>
-<w><t>ac-cel-er-ant</t></w>
-<w><t>ac-cel-er-ate</t></w>
-<w><t>ac-cel-er-at-ed</t></w>
-<w><t>ac-cel-er-at-ed-ly</t></w>
-<w><t>ac-cel-er-at-ing</t></w>
-<w><t>ac-cel-er-a-tion</t></w>
-<w><t>ac-cel-er-a-tive</t></w>
-<w><t>ac-cel-er-a-tor</t></w>
-<w><t>ac-cel-er-a-to-ry</t></w>
-<w><t>ac-cel-er-om-e-ter</t></w>
-<w><t>ac-cent</t></w>
-<w><t>ac-cent-less</t></w>
-<w><t>ac-cen-tor</t></w>
-<w><t>ac-cen-tu-a-ble</t></w>
-<w><t>ac-cen-tu-al</t></w>
-<w><t>ac-cen-tu-al-i-ty</t></w>
-<w><t>ac-cen-tu-al-ly</t></w>
-<w><t>ac-cen-tu-ate</t></w>
-<w><t>ac-cen-tu-at-ed</t></w>
-<w><t>ac-cen-tu-at-ing</t></w>
-<w><t>ac-cen-tu-a-tion</t></w>
-<w><t>ac-cen-tu-a-tor</t></w>
-<w><t>ac-cept</t></w>
-<w><t>ac-cept-a-bil-i-ty</t></w>
-<w><t>ac-cept-a-ble</t></w>
-<w><t>ac-cept-a-ble-ness</t></w>
-<w><t>ac-cept-a-bly</t></w>
-<w><t>ac-cept-ance</t></w>
-<w><t>ac-cept-an-cy</t></w>
-<w><t>ac-cept-ant</t></w>
-<w><t>ac-cep-ta-tion</t></w>
-<w><t>ac-cept-ed</t></w>
-<w><t>ac-cept-ed-ly</t></w>
-<w><t>ac-cept-ee</t></w>
-<w><t>ac-cept-er</t></w>
-<w><t>ac-cep-tor</t></w>
-<w><t>ac-cess</t></w>
-<phrase><t>ac-cess road</t></phrase>
-<phrase><t>ac-cess time</t></phrase>
-<w><t>ac-ces-sa-ri-ly</t></w>
-<w><t>ac-ces-sa-ri-ness</t></w>
-<w><t>ac-ces-sa-ry</t></w>
-<w><t>ac-ces-si-bil-i-ty</t></w>
-<w><t>ac-ces-si-ble</t></w>
-<w><t>ac-ces-si-bly</t></w>
-<w><t>ac-ces-sion</t></w>
-<phrase><t>ac-ces-sion num-ber</t></phrase>
-<w><t>ac-ces-sion-al</t></w>
-<w><t>ac-ces-so-ri-al</t></w>
-<w><t>ac-ces-so-ri-i</t></w>
-<w><t>ac-ces-so-ri-ly</t></w>
-<w><t>ac-ces-so-ri-ness</t></w>
-<w><t>ac-ces-so-ri-us</t></w>
-<w><t>ac-ces-so-rize</t></w>
-<w><t>ac-ces-so-rized</t></w>
-<w><t>ac-ces-so-riz-ing</t></w>
-<w><t>ac-ces-so-ry</t></w>
-<phrase><t>ac-ces-so-ry fruit</t></phrase>
-<phrase><t>ac-ces-so-ry nerve</t></phrase>
-<w><t>ac-ciac-ca-tu-ra</t></w>
-<w><t>ac-ciac-catu-ras</t></w>
-<w><t>ac-ciac-ca-tu-re</t></w>
-<w><t>ac-ci-dence</t></w>
-<w><t>ac-ci-dent</t></w>
-<phrase><t>ac-ci-dent in-sur-ance</t></phrase>
-<w><t>ac-ci-dent=prone</t></w>
-<w><t>ac-ci-den-tal</t></w>
-<w><t>ac-ci-den-tal-ism</t></w>
-<w><t>ac-ci-den-tal-ist</t></w>
-<w><t>ac-ci-den-tal-i-ty</t></w>
-<w><t>ac-ci-den-tal-ly</t></w>
-<w><t>ac-ci-den-tal-ness</t></w>
-<w><t>ac-ci-die</t></w>
-<w><t>ac-cip-i-ter</t></w>
-<w><t>ac-cip-i-tral</t></w>
-<w><t>ac-cip-i-trine</t></w>
-<w><t>Ac-ci-us</t></w>
-<w><t>ac-claim</t></w>
-<w><t>ac-claim-er</t></w>
-<w><t>ac-cla-ma-tion</t></w>
-<w><t>ac-clam-a-to-ry</t></w>
-<w><t>ac-cli-mat-a-ble</t></w>
-<w><t>ac-cli-mate</t></w>
-<w><t>ac-cli-mat-ed</t></w>
-<w><t>ac-cli-mat-ing</t></w>
-<w><t>ac-cli-ma-tion</t></w>
-<w><t>ac-cli-ma-tis-a-ble</t></w>
-<w><t>ac-cli-ma-ti-sa-tion</t></w>
-<w><t>ac-cli-ma-tise</t></w>
-<w><t>ac-cli-ma-tised</t></w>
-<w><t>ac-cli-ma-tis-er</t></w>
-<w><t>ac-cli-ma-tis-ing</t></w>
-<w><t>ac-cli-ma-tiz-a-ble</t></w>
-<w><t>ac-cli-ma-ti-za-tion</t></w>
-<w><t>ac-cli-ma-tize</t></w>
-<w><t>ac-cli-ma-tized</t></w>
-<w><t>ac-cli-ma-tiz-ing</t></w>
-<w><t>ac-cliv-i-tous</t></w>
-<w><t>ac-cliv-i-ty</t></w>
-<w><t>ac-cli-vous</t></w>
-<w><t>ac-co-lade</t></w>
-<w><t>ac-co-lad-ed</t></w>
-<w><t>ac-co-lat-ed</t></w>
-<w><t>ac-com-mo-da-ble</t></w>
-<w><t>ac-com-mo-date</t></w>
-<w><t>ac-com-mo-dat-ed</t></w>
-<w><t>ac-com-mo-dat-ing</t></w>
-<w><t>ac-com-mo-dat-ing-ly</t></w>
-<w><t>ac-com-mo-da-tion</t></w>
-<phrase><t>ac-com-mo-da-tion ad-dress</t></phrase>
-<phrase><t>ac-com-mo-da-tion bill</t></phrase>
-<phrase><t>ac-com-mo-da-tion lad-der</t></phrase>
-<w><t>ac-com-mo-da-tion-al</t></w>
-<w><t>ac-com-mo-da-tive</t></w>
-<w><t>ac-com-mo-da-tive-ness</t></w>
-<w><t>ac-com-mo-da-tor</t></w>
-<w><t>ac-com-pa-nied</t></w>
-<w><t>ac-com-pa-ni-er</t></w>
-<w><t>ac-com-pa-ni-ment</t></w>
-<w><t>ac-com-pa-nist</t></w>
-<w><t>ac-com-pa-ny</t></w>
-<w><t>ac-com-pa-ny-ing</t></w>
-<w><t>ac-com-pa-ny-ist</t></w>
-<w><t>ac-com-plice</t></w>
-<w><t>ac-com-plish</t></w>
-<w><t>ac-com-plish-a-ble</t></w>
-<w><t>ac-com-plished</t></w>
-<w><t>ac-com-plish-er</t></w>
-<w><t>ac-com-plish-ment</t></w>
-<w><t>ac-compt</t></w>
-<w><t>ac-cord</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
-<w><t>ac-cord-a-ble</t></w>
-<w><t>ac-cord-ance</t></w>
-<w><t>ac-cord-ant</t></w>
-<w><t>ac-cord-ant-ly</t></w>
-<w><t>ac-cor-da-tu-ra</t></w>
-<w><t>ac-cor-da-tu-ras</t></w>
-<w><t>ac-cor-da-tu-re</t></w>
-<w><t>ac-cord-er</t></w>
-<w><t>ac-cord-ing</t></w>
-<w><t>ac-cord-ing-ly</t></w>
-<w><t>ac-cor-di-on</t></w>
-<phrase><t>ac-cor-di-on pleats</t></phrase>
-<w><t>ac-cor-di-on-ist</t></w>
-<w><t>ac-cost</t></w>
-<w><t>ac-cost-a-ble</t></w>
-<w><t>ac-cost-ed</t></w>
-<w><t>ac-couche-ment</t></w>
-<w><t>ac-cou-cheur</t></w>
-<w><t>ac-coucheuse</t></w>
-<w><t>ac-cou-cheuse</t></w>
-<w><t>ac-count</t></w>
-<phrase><t>ac-count day</t></phrase>
-<phrase><t>ac-count for</t></phrase>
-<phrase><t>ac-count pay-a-ble</t></phrase>
-<phrase><t>ac-count re-ceiv-a-ble</t></phrase>
-<w><t>ac-count-a-bil-i-ty</t></w>
-<w><t>ac-count-a-ble</t></w>
-<w><t>ac-count-a-ble-ness</t></w>
-<w><t>ac-count-a-bly</t></w>
-<w><t>ac-count-an-cy</t></w>
-<w><t>ac-count-ant</t></w>
-<w><t>ac-count-ant-ship</t></w>
-<w><t>ac-count-ing</t></w>
-<w><t>ac-cou-ple-ment</t></w>
-<w><t>ac-cou-ter</t></w>
-<w><t>ac-cou-terment</t></w>
-<w><t>ac-cou-ter-ment</t></w>
-<w><t>ac-cou-tre</t></w>
-<w><t>ac-cou-trement</t></w>
-<w><t>ac-cou-tre-ment</t></w>
-<w><t>Ac-cra</t></w>
-<w><t>ac-cra</t></w>
-<w><t>ac-cred-it</t></w>
-<w><t>ac-cred-i-ta-tion</t></w>
-<w><t>ac-cred-it-ment</t></w>
-<w><t>ac-cres-cent</t></w>
-<w><t>ac-crete</t></w>
-<w><t>ac-cret-ed</t></w>
-<w><t>ac-cret-ing</t></w>
-<w><t>ac-cre-tion</t></w>
-<w><t>ac-cre-tion-ar-y</t></w>
-<w><t>ac-cre-tive</t></w>
-<w><t>Ac-cring-ton</t></w>
-<w><t>ac-croach</t></w>
-<w><t>ac-croach-ment</t></w>
-<w><t>ac-cru-al</t></w>
-<w><t>ac-crue</t></w>
-<w><t>ac-crued</t></w>
-<w><t>ac-crue-ment</t></w>
-<w><t>ac-cru-ing</t></w>
-<w><t>ac-cul-tur-ate</t></w>
-<w><t>ac-cul-tur-at-ed</t></w>
-<w><t>ac-cul-tur-at-ing</t></w>
-<w><t>ac-cul-tur-a-tion</t></w>
-<w><t>ac-cul-tur-a-tion-al</t></w>
-<w><t>ac-cul-tur-a-tion-ist</t></w>
-<w><t>ac-cul-tur-a-tive</t></w>
-<w><t>ac-cul-tur-ize</t></w>
-<w><t>ac-cul-tur-ized</t></w>
-<w><t>ac-cul-tur-iz-ing</t></w>
-<w><t>ac-cum-ben-cy</t></w>
-<w><t>ac-cum-bent</t></w>
-<w><t>ac-cu-mu-la-ble</t></w>
-<w><t>ac-cu-mu-late</t></w>
-<w><t>ac-cu-mu-lat-ed</t></w>
-<w><t>ac-cu-mu-lat-ing</t></w>
-<w><t>ac-cu-mu-la-tion</t></w>
-<phrase><t>ac-cu-mu-la-tion point</t></phrase>
-<w><t>ac-cu-mu-la-tive</t></w>
-<w><t>ac-cu-mu-la-tive-ly</t></w>
-<w><t>ac-cu-mu-la-tive-ness</t></w>
-<w><t>ac-cu-mu-la-tor</t></w>
-<w><t>ac-cu-ra-cy</t></w>
-<w><t>ac-cu-rate</t></w>
-<w><t>ac-cu-rate-ly</t></w>
-<w><t>ac-cu-rate-ness</t></w>
-<w><t>ac-curs-ed</t></w>
-<w><t>ac-curs-ed-ly</t></w>
-<w><t>ac-curs-ed-ness</t></w>
-<w><t>ac-curst</t></w>
-<w><t>ac-cus-a-ble</t></w>
-<w><t>ac-cus-a-bly</t></w>
-<w><t>ac-cus-al</t></w>
-<w><t>ac-cus-ant</t></w>
-<w><t>ac-cu-sa-tion</t></w>
-<w><t>ac-cu-sa-ti-val</t></w>
-<w><t>ac-cu-sa-tive</t></w>
-<w><t>ac-cu-sa-tive-ly</t></w>
-<w><t>ac-cu-sa-to-ri-al</t></w>
-<w><t>ac-cu-sa-to-ri-al-ly</t></w>
-<w><t>ac-cu-sa-to-ry</t></w>
-<w><t>ac-cuse</t></w>
-<w><t>ac-cused</t></w>
-<w><t>ac-cus-er</t></w>
-<w><t>ac-cus-ing</t></w>
-<w><t>ac-cus-ing-ly</t></w>
-<w><t>ac-cus-tom</t></w>
-<w><t>ac-cus-tomed</t></w>
-<w><t>ac-cus-tomed-ly</t></w>
-<w><t>ac-cus-tomed-ness</t></w>
-<w><t>Ac-cu-tron</t></w>
-<w><t>ace</t></w>
-<w><t>a-ce-di-a</t></w>
-<w><t>A-cel-da-ma</t></w>
-<w><t>a-cel-lu-lar</t></w>
-<w><t>a-ce-nes-the-sia</t></w>
-<w><t>a-cen-tric</t></w>
-<w><t>a-ceph-a-lous</t></w>
-<w><t>a-ce-quia</t></w>
-<w><t>ac-er-ate</t></w>
-<w><t>a-cerb</t></w>
-<w><t>A-cer-bas</t></w>
-<w><t>ac-er-bate</t></w>
-<w><t>ac-er-bat-ed</t></w>
-<w><t>ac-er-bat-ing</t></w>
-<w><t>a-cer-bic</t></w>
-<w><t>a-cer-bi-ty</t></w>
-<w><t>ac-er-dol</t></w>
-<w><t>ac-er-ose</t></w>
-<w><t>ac-er-ous</t></w>
-<w><t>a-ce-rous</t></w>
-<w><t>a-cer-vate</t></w>
-<w><t>a-cer-vate-ly</t></w>
-<w><t>a-cer-vu-lus</t></w>
-<w><t>a-ces-cence</t></w>
-<w><t>a-ces-cen-cy</t></w>
-<w><t>a-ces-cent</t></w>
-<w><t>A-ces-i-us</t></w>
-<w><t>a-ces-o-dyne</t></w>
-<w><t>ac-e-sod-y-nous</t></w>
-<w><t>A-ces-sa-me-nus</t></w>
-<w><t>a-ces-to-ma</t></w>
-<w><t>ac-e-tab-u-lar</t></w>
-<w><t>ac-e-tab-u-li-form</t></w>
-<w><t>ac-e-tab-u-lum</t></w>
-<w><t>ac-e-tal</t></w>
-<w><t>ac-et-al-de-hyde</t></w>
-<w><t>ac-e-tal-dol</t></w>
-<w><t>ac-et-am-id</t></w>
-<w><t>ac-et-am-ide</t></w>
-<w><t>ac-et-an-i-lid</t></w>
-<w><t>ac-et-an-i-lide</t></w>
-<w><t>ac-et-a-nis-i-dine</t></w>
-<w><t>ac-e-tate</t></w>
-<phrase><t>ac-e-tate ray-on</t></phrase>
-<w><t>ac-e-tat-ed</t></w>
-<w><t>ac-e-ta-tion</t></w>
-<w><t>ac-et-a-zol-a-mide</t></w>
-<w><t>A-ce-tes</t></w>
-<w><t>a-ce-tic</t></w>
-<phrase><t>a-ce-tic ac-id</t></phrase>
-<phrase><t>a-ce-tic an-hy-dride</t></phrase>
-<w><t>a-cet-i-fi-ca-tion</t></w>
-<w><t>a-cet-i-fied</t></w>
-<w><t>a-cet-i-fi-er</t></w>
-<w><t>a-cet-i-fy</t></w>
-<w><t>a-cet-i-fy-ing</t></w>
-<w><t>ac-e-tim-e-ter</t></w>
-<w><t>ac-e-ti-met-ric</t></w>
-<w><t>ac-e-tim-e-try</t></w>
-<w><t>ac-e-tin</t></w>
-<w><t>a-ce-to-bac-ter</t></w>
-<w><t>a-cet-o-in</t></w>
-<w><t>ac-e-tom-e-ter</t></w>
-<w><t>ac-e-to-met-ri-cal</t></w>
-<w><t>ac-e-to-met-ri-cal-ly</t></w>
-<w><t>ac-e-tom-e-try</t></w>
-<w><t>ac-e-tone</t></w>
-<phrase><t>ac-e-tone bod-y</t></phrase>
-<w><t>ac-e-ton-ic</t></w>
-<w><t>ac-e-to-ni-trile</t></w>
-<w><t>ac-e-to-phe-net-i-din</t></w>
-<w><t>a-ce-to-phe-net-i-din</t></w>
-<w><t>ac-e-to-phe-net-i-dine</t></w>
-<w><t>ac-e-to-phe-none</t></w>
-<w><t>ac-e-tose</t></w>
-<w><t>ac-e-to-ste-a-rin</t></w>
-<w><t>ac-e-tous</t></w>
-<w><t>a-ce-tum</t></w>
-<w><t>ac-e-tyl</t></w>
-<w><t>a-ce-tyl</t></w>
-<w><t>a-ce-tyl-am-i-no-ben-zene</t></w>
-<w><t>a-ce-tyl-an-i-line</t></w>
-<w><t>a-cet-y-late</t></w>
-<w><t>a-cet-y-lat-ed</t></w>
-<w><t>a-cet-y-lat-ing</t></w>
-<w><t>a-cet-y-la-tion</t></w>
-<w><t>a-ce-tyl-ben-zene</t></w>
-<w><t>ac-e-tyl-cho-line</t></w>
-<w><t>a-ce-tyl-cho-line</t></w>
-<w><t>a-cet-y-lene</t></w>
-<w><t>a-cet-y-len-ic</t></w>
-<w><t>a-cet-y-le-no-gen</t></w>
-<w><t>ac-e-tyl-ic</t></w>
-<w><t>a-cet-y-lide</t></w>
-<w><t>a-cet-y-li-za-tion</t></w>
-<w><t>a-cet-y-lize</t></w>
-<w><t>a-cet-y-lized</t></w>
-<w><t>a-cet-y-liz-er</t></w>
-<w><t>a-cet-y-liz-ing</t></w>
-<w><t>a-ce-tyl-meth-yl-car-bi-nol</t></w>
-<phrase><t>ac-e-tyl-sal-i-cyl-ic ac-id</t></phrase>
-<w><t>ace-y=deuc-y</t></w>
-<w><t>A-chab</t></w>
-<w><t>A-chad</t></w>
-<w><t>A-chae-a</t></w>
-<w><t>A-chae-an</t></w>
-<phrase><t>A-chae-an League</t></phrase>
-<w><t>A-chae-me-nes</t></w>
-<w><t>Ach-ae-me-ni-an</t></w>
-<w><t>A-chae-me-nid</t></w>
-<w><t>Ach-ae-men-i-dae</t></w>
-<w><t>A-chae-me-nids</t></w>
-<w><t>A-chae-us</t></w>
-<w><t>A-cha-ia</t></w>
-<w><t>A-chai-an</t></w>
-<w><t>A-cha-ian</t></w>
-<w><t>ach-a-la-sia</t></w>
-<w><t>A-chan</t></w>
-<w><t>a-char</t></w>
-<w><t>A-char-ni-ans</t></w>
-<w><t>A-cha-tes</t></w>
-<w><t>A-chaz</t></w>
-<w><t>ache</t></w>
-<w><t>a-chech</t></w>
-<w><t>a-chei-la-ry</t></w>
-<w><t>Ach-e-lo-us</t></w>
-<w><t>a-chene</t></w>
-<w><t>a-che-ni-al</t></w>
-<w><t>A-cher-nar</t></w>
-<w><t>Ach-er-on</t></w>
-<w><t>Ach-e-son</t></w>
-<w><t>A-cheu-le-an</t></w>
-<w><t>A-cheu-li-an</t></w>
-<w><t>a-chiev-a-ble</t></w>
-<w><t>a-chieve</t></w>
-<w><t>a-chieved</t></w>
-<w><t>a-chieve-ment</t></w>
-<phrase><t>a-chieve-ment age</t></phrase>
-<phrase><t>a-chieve-ment quo-tient</t></phrase>
-<phrase><t>a-chieve-ment test</t></phrase>
-<w><t>a-chiev-er</t></w>
-<w><t>a-chiev-ing</t></w>
-<w><t>a-chi-la-ry</t></w>
-<w><t>Ach-ill</t></w>
-<phrase><t>Ach-ill Is-land</t></phrase>
-<w><t>Ach-il-le-an</t></w>
-<w><t>A-chil-les</t></w>
-<phrase><t>A-chil-les heel</t></phrase>
-<phrase><t>A-chil-les ten-don</t></phrase>
-<w><t>A-chim-a-as</t></w>
-<w><t>A-chim-e-lech</t></w>
-<w><t>a-chim-e-nes</t></w>
-<w><t>ach-ing</t></w>
-<w><t>ach-ing-ly</t></w>
-<w><t>A-chish</t></w>
-<w><t>A-chit-o-phel</t></w>
-<w><t>ach-kan</t></w>
-<w><t>a-chlam-y-date</t></w>
-<w><t>ach-la-myd-e-ous</t></w>
-<w><t>a-chlor-hy-dri-a</t></w>
-<w><t>a-chlor-hy-dric</t></w>
-<w><t>a-chlo-ro-phyl-lous</t></w>
-<w><t>Ach-med</t></w>
-<w><t>a-cho-li-a</t></w>
-<w><t>a-chol-ic</t></w>
-<w><t>ach-o-lu-ri-a</t></w>
-<w><t>ach-o-lu-ric</t></w>
-<w><t>a-chon-drite</t></w>
-<w><t>a-chon-drit-ic</t></w>
-<w><t>a-chon-dro-pla-sia</t></w>
-<w><t>a-chon-dro-pla-si-a</t></w>
-<w><t>a-chon-dro-plas-tic</t></w>
-<w><t>ach-ro-ite</t></w>
-<w><t>ach-ro-mat</t></w>
-<w><t>ach-ro-mate</t></w>
-<w><t>ach-ro-mat-ic</t></w>
-<phrase><t>ach-ro-mat-ic col-or</t></phrase>
-<phrase><t>ach-ro-mat-ic lens</t></phrase>
-<w><t>ach-ro-mat-i-cal-ly</t></w>
-<w><t>ach-ro-ma-tic-i-ty</t></w>
-<w><t>a-chro-ma-tin</t></w>
-<w><t>a-chro-ma-tise</t></w>
-<w><t>a-chro-ma-tised</t></w>
-<w><t>a-chro-ma-tis-ing</t></w>
-<w><t>a-chro-ma-tism</t></w>
-<w><t>a-chro-ma-ti-za-tion</t></w>
-<w><t>a-chro-ma-tize</t></w>
-<w><t>a-chro-ma-tized</t></w>
-<w><t>a-chro-ma-tiz-ing</t></w>
-<w><t>a-chro-mat-o-phil</t></w>
-<w><t>a-chro-mat-o-phil-i-a</t></w>
-<w><t>a-chro-mat-o-phil-ic</t></w>
-<w><t>a-chro-ma-tous</t></w>
-<w><t>a-chro-mic</t></w>
-<w><t>a-chro-mo-bac-ter</t></w>
-<w><t>a-chro-mous</t></w>
-<w><t>Ach-ro-my-cin</t></w>
-<w><t>a-chron-y-chous</t></w>
-<w><t>Ach-sah</t></w>
-<w><t>a-cic-u-la</t></w>
-<w><t>a-cic-u-lar</t></w>
-<w><t>a-cic-u-lar-i-ty</t></w>
-<w><t>a-cic-u-lar-ly</t></w>
-<w><t>a-cic-u-late</t></w>
-<w><t>a-cic-u-lat-ed</t></w>
-<w><t>a-cic-u-lum</t></w>
-<w><t>ac-id</t></w>
-<phrase><t>ac-id drop</t></phrase>
-<phrase><t>ac-id rock</t></phrase>
-<phrase><t>ac-id soil</t></phrase>
-<phrase><t>ac-id test</t></phrase>
-<phrase><t>ac-id val-ue</t></phrase>
-<w><t>ac-id=fast</t></w>
-<w><t>ac-id=fast-ness</t></w>
-<w><t>ac-id=form-ing</t></w>
-<w><t>ac-id=head</t></w>
-<w><t>Ac-i-dal-i-um</t></w>
-<w><t>Ac-i-dan-the-ra</t></w>
-<w><t>ac-i-de-mi-a</t></w>
-<w><t>a-cid-ic</t></w>
-<w><t>a-cid-i-fi-a-ble</t></w>
-<w><t>a-cid-i-fi-ca-tion</t></w>
-<w><t>a-cid-i-fied</t></w>
-<w><t>a-cid-i-fi-er</t></w>
-<w><t>a-cid-i-fy</t></w>
-<w><t>a-cid-i-fy-ing</t></w>
-<w><t>ac-i-dim-e-ter</t></w>
-<w><t>ac-i-di-met-ric</t></w>
-<w><t>ac-i-di-met-ri-cal-ly</t></w>
-<w><t>ac-i-dim-e-try</t></w>
-<w><t>a-cid-i-ty</t></w>
-<w><t>ac-id-ize</t></w>
-<w><t>ac-id-ized</t></w>
-<w><t>ac-id-iz-ing</t></w>
-<w><t>ac-id-ly</t></w>
-<w><t>ac-id-ness</t></w>
-<w><t>ac-i-do-gen-ic</t></w>
-<w><t>ac-i-dol-y-sis</t></w>
-<w><t>ac-i-dom-e-ter</t></w>
-<w><t>ac-i-do-phil</t></w>
-<w><t>ac-i-do-phile</t></w>
-<w><t>ac-i-do-phil-ic</t></w>
-<w><t>ac-i-doph-i-lus</t></w>
-<phrase><t>ac-i-doph-i-lus milk</t></phrase>
-<w><t>ac-i-do-sis</t></w>
-<w><t>ac-i-dot-ic</t></w>
-<w><t>a-cid-u-lant</t></w>
-<w><t>a-cid-u-late</t></w>
-<w><t>a-cid-u-lat-ed</t></w>
-<w><t>a-cid-u-lat-ing</t></w>
-<w><t>a-cid-u-la-tion</t></w>
-<w><t>a-cid-u-lent</t></w>
-<w><t>a-cid-u-lous</t></w>
-<w><t>ac-i-du-ric</t></w>
-<w><t>ac-id-y</t></w>
-<w><t>ac-i-er-ate</t></w>
-<w><t>ac-i-er-at-ed</t></w>
-<w><t>ac-i-er-at-ing</t></w>
-<w><t>ac-i-er-a-tion</t></w>
-<w><t>ac-i-form</t></w>
-<w><t>ac-i-na-ceous</t></w>
-<w><t>a-cin-a-ci-fo-li-ate</t></w>
-<w><t>a-cin-a-ci-fo-li-ous</t></w>
-<w><t>ac-i-nac-i-form</t></w>
-<w><t>ac-i-nar-i-ous</t></w>
-<w><t>ac-ing</t></w>
-<w><t>a-cin-ic</t></w>
-<w><t>a-cin-i-form</t></w>
-<w><t>ac-i-nose</t></w>
-<w><t>ac-i-nous</t></w>
-<w><t>ac-i-nus</t></w>
-<w><t>A-cis</t></w>
-<w><t>ack=ack</t></w>
-<w><t>ack-ee</t></w>
-<w><t>Ack-er-ley</t></w>
-<w><t>ack-ey</t></w>
-<w><t>Ack-ley</t></w>
-<w><t>ac-knowl-edge</t><verb><regular-root/></verb></w>
-<w><t>ac-knowl-edge-a-ble</t></w>
-<w><t>ac-knowl-edged</t></w>
-<w><t>ac-knowl-edged-ly</t></w>
-<w><t>ac-knowl-edge-ment</t></w>
-<w><t>ac-knowl-edg-er</t></w>
-<w><t>ac-knowl-edg-ing</t></w>
-<w><t>ac-knowl-edg-ment</t></w>
-<w><t>ack-ton</t></w>
-<w><t>ac-lau-rin</t></w>
-<w><t>ac-le</t></w>
-<w><t>a-cleis-to-car-di-a</t></w>
-<phrase><t>a-clin-ic line</t></phrase>
-<w><t>ac-maes-the-sia</t></w>
-<w><t>ac-me</t></w>
-<w><t>ac-mes-the-sia</t></w>
-<w><t>ac-mic</t></w>
-<w><t>ac-mite</t></w>
-<w><t>Ac-mon</t></w>
-<w><t>ac-ne</t></w>
-<w><t>ac-ne-mi-a</t></w>
-<w><t>ac-no-dal</t></w>
-<w><t>ac-node</t></w>
-<w><t>ac-o-asm</t></w>
-<w><t>a-cock</t></w>
-<w><t>a-cock-bill</t></w>
-<w><t>ac-o-cotl</t></w>
-<w><t>a-coe-lo-mate</t></w>
-<w><t>a-coe-lom-a-tous</t></w>
-<w><t>a-coe-lous</t></w>
-<w><t>A-coe-me-tae</t></w>
-<w><t>A-coe-me-ti</t></w>
-<w><t>a-coe-naes-the-sia</t></w>
-<w><t>Ac-ol</t></w>
-<w><t>a-cold</t></w>
-<w><t>ac-o-lyte</t></w>
-<w><t>A-con-ca-gua</t></w>
-<w><t>ac-o-nite</t></w>
-<w><t>ac-o-nit-ic</t></w>
-<w><t>ac-o-ni-tum</t></w>
-<w><t>a-co-ni-tum</t></w>
-<w><t>acor-a-ble</t></w>
-<w><t>a-corn</t></w>
-<phrase><t>a-corn bar-na-cle</t></phrase>
-<phrase><t>a-corn valve</t></phrase>
-<phrase><t>a-corn worm</t></phrase>
-<w><t>a-corned</t></w>
-<w><t>a-cos-mism</t></w>
-<w><t>a-cos-mist</t></w>
-<w><t>a-cos-mis-tic</t></w>
-<w><t>a-cot-y-le-don</t></w>
-<w><t>a-cot-y-le-don-ous</t></w>
-<w><t>a-cou-asm</t></w>
-<w><t>a-cou-chi</t></w>
-<w><t>a-cou-chy</t></w>
-<w><t>a-cous-ma</t></w>
-<w><t>a-cous-mas</t></w>
-<w><t>a-cous-ma-ta</t></w>
-<w><t>a-cous-tic</t></w>
-<phrase><t>a-cous-tic fea-ture</t></phrase>
-<phrase><t>a-cous-tic nerve</t></phrase>
-<phrase><t>a-cous-tic pho-net-ics</t></phrase>
-<w><t>a-cous-ti-cal</t></w>
-<w><t>a-cous-ti-cal-ly</t></w>
-<w><t>ac-ous-ti-cian</t></w>
-<w><t>a-cous-ti-cian</t></w>
-<w><t>a-cous-tics</t></w>
-<w><t>acpt</t></w>
-<w><t>ac-quaint</t></w>
-<w><t>ac-quaint-ance</t></w>
-<w><t>ac-quaint-ance-ship</t></w>
-<w><t>ac-quaint-ed</t></w>
-<w><t>ac-quaint-ed-ness</t></w>
-<w><t>ac-quest</t></w>
-<w><t>ac-qui-esce</t></w>
-<w><t>ac-qui-es-cence</t></w>
-<w><t>ac-qui-es-cent</t></w>
-<w><t>ac-qui-es-cent-ly</t></w>
-<w><t>ac-qui-esc-ing-ly</t></w>
-<w><t>ac-quir-a-bil-i-ty</t></w>
-<w><t>ac-quir-a-ble</t></w>
-<w><t>ac-quire</t></w>
-<w><t>ac-quired</t></w>
-<phrase><t>ac-quired char-ac-ter-is-tic</t></phrase>
-<phrase><t>ac-quired taste</t></phrase>
-<w><t>ac-quire-ment</t></w>
-<w><t>ac-quir-er</t></w>
-<w><t>ac-quir-ing</t></w>
-<w><t>ac-qui-si-tion</t></w>
-<w><t>ac-quis-i-tive</t></w>
-<w><t>ac-quis-i-tive-ly</t></w>
-<w><t>ac-quis-i-tive-ness</t></w>
-<w><t>ac-quit</t></w>
-<w><t>ac-quit-tal</t></w>
-<w><t>ac-quit-tance</t></w>
-<w><t>ac-quit-ted</t></w>
-<w><t>ac-quit-ter</t></w>
-<w><t>ac-quit-ting</t></w>
-<w><t>A-crae-a</t></w>
-<w><t>a-cral-de-hyde</t></w>
-<w><t>A-cre</t></w>
-<w><t>a-cre</t></w>
-<w><t>a-cre=foot</t></w>
-<w><t>a-cre=inch</t></w>
-<w><t>a-cre-age</t></w>
-<w><t>a-cred</t></w>
-<w><t>A-c-res</t></w>
-<w><t>ac-rid</t></w>
-<w><t>ac-ri-dine</t></w>
-<w><t>a-crid-i-ty</t></w>
-<w><t>ac-rid-ly</t></w>
-<w><t>ac-ri-fla-vine</t></w>
-<phrase><t>ac-ri-fla-vine hy-dro-chlor-ide</t></phrase>
-<w><t>Ac-ri-lan</t></w>
-<w><t>ac-ri-mo-ni-ous</t></w>
-<w><t>ac-ri-mo-ni-ous-ly</t></w>
-<w><t>ac-ri-mo-ni-ous-ness</t></w>
-<w><t>ac-ri-mo-ny</t></w>
-<w><t>A-cris-i-us</t></w>
-<w><t>a-crit-i-cal</t></w>
-<w><t>ac-ro-bat</t></w>
-<w><t>ac-ro-bat-ic</t></w>
-<w><t>ac-ro-bat-i-cal</t></w>
-<w><t>ac-ro-bat-i-cal-ly</t></w>
-<w><t>ac-ro-bat-ics</t></w>
-<w><t>ac-ro-bat-ism</t></w>
-<w><t>ac-ro-car-pous</t></w>
-<w><t>ac-ro-ce-pha-lia</t></w>
-<w><t>ac-ro-ce-phal-ic</t></w>
-<w><t>ac-ro-ceph-a-lous</t></w>
-<w><t>ac-ro-ceph-a-ly</t></w>
-<w><t>Ac-ro-cor-inth</t></w>
-<w><t>ac-ro-cy-a-no-sis</t></w>
-<w><t>ac-ro-dont</t></w>
-<w><t>ac-ro-dont-ism</t></w>
-<w><t>ac-ro-drome</t></w>
-<w><t>a-crod-ro-mous</t></w>
-<w><t>ac-ro-dyn-i-a</t></w>
-<w><t>ac-ro-gen</t></w>
-<w><t>ac-ro-gen-ic</t></w>
-<w><t>a-crog-e-nous-ly</t></w>
-<w><t>a-crog-ra-phy</t></w>
-<w><t>a-crog-y-nous</t></w>
-<w><t>a-cro-le-in</t></w>
-<w><t>ac-ro-lith</t></w>
-<w><t>ac-ro-lith-ic</t></w>
-<w><t>ac-ro-log-ic</t></w>
-<w><t>ac-ro-log-i-cal-ly</t></w>
-<w><t>a-crol-o-gy</t></w>
-<w><t>ac-ro-me-gal-ic</t></w>
-<w><t>ac-ro-meg-a-ly</t></w>
-<w><t>a-cro-mi-a</t></w>
-<w><t>a-cro-mi-al</t></w>
-<w><t>ac-ro-mic-ri-a</t></w>
-<w><t>a-cro-mi-on</t></w>
-<w><t>ac-ron</t></w>
-<w><t>ac-ro-nal</t></w>
-<w><t>a-cron-i-cal</t></w>
-<w><t>a-cron-i-cal-ly</t></w>
-<w><t>a-cron-y-cal</t></w>
-<w><t>a-cron-y-cal-ly</t></w>
-<w><t>a-cron-y-chal</t></w>
-<w><t>a-cron-y-chous</t></w>
-<w><t>ac-ro-nym</t></w>
-<w><t>ac-ro-nym-ic</t></w>
-<w><t>a-cron-y-mize</t></w>
-<w><t>a-cron-y-mized</t></w>
-<w><t>a-cron-y-miz-ing</t></w>
-<w><t>a-cron-y-mous</t></w>
-<w><t>a-crop-a-thy</t></w>
-<w><t>a-crop-e-tal</t></w>
-<w><t>a-crop-e-tal-ly</t></w>
-<w><t>ac-ro-pho-bi-a</t></w>
-<w><t>ac-ro-phon-ic</t></w>
-<w><t>ac-ro-phon-i-cal-ly</t></w>
-<w><t>a-croph-o-ny</t></w>
-<w><t>A-crop-o-lis</t></w>
-<w><t>a-crop-o-lis</t></w>
-<w><t>ac-ro-pol-i-tan</t></w>
-<w><t>ac-ro-spire</t></w>
-<w><t>ac-ro-spore</t></w>
-<w><t>ac-ro-spo-rous</t></w>
-<w><t>a-cross</t></w>
-<w><t>a-cross=the=board</t></w>
-<w><t>a-cros-tic</t></w>
-<w><t>a-cros-ti-cal</t></w>
-<w><t>a-cros-ti-cal-ly</t></w>
-<w><t>ac-ro-sto-li-a</t></w>
-<w><t>ac-ro-sto-li-um</t></w>
-<w><t>ac-ro-ter</t></w>
-<w><t>a-cro-ter</t></w>
-<w><t>ac-ro-te-ral</t></w>
-<w><t>ac-ro-te-ri-a</t></w>
-<w><t>ac-ro-te-ri-al</t></w>
-<w><t>ac-ro-te-ri-on</t></w>
-<w><t>ac-ro-te-ri-um</t></w>
-<w><t>a-crot-ic</t></w>
-<w><t>ac-ro-tism</t></w>
-<w><t>A-crux</t></w>
-<w><t>ac-ryl-al-de-hyde</t></w>
-<w><t>ac-ry-late</t></w>
-<w><t>a-cryl-ic</t></w>
-<phrase><t>a-cryl-ic ac-id</t></phrase>
-<phrase><t>a-cryl-ic fi-bre</t></phrase>
-<phrase><t>a-cryl-ic res-in</t></phrase>
-<w><t>ac-ry-lo-ni-trile</t></w>
-<w><t>ac-ryl-yl</t></w>
-<w><t>ac-ry-lyl</t></w>
-<w><t>act</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
-<phrase><t>act of con-tri-tion</t></phrase>
-<w><t>Ac-ta</t></w>
-<w><t>act-a-bil-i-ty</t></w>
-<w><t>act-a-ble</t></w>
-<w><t>Ac-tae-on</t></w>
-<w><t>actg</t></w>
-<w><t>ac-tin</t></w>
-<w><t>ac-ti-nal</t></w>
-<w><t>ac-ti-nal-ly</t></w>
-<w><t>act-ing</t></w>
-<w><t>ac-tin-i-a</t></w>
-<w><t>ac-tin-i-ae</t></w>
-<w><t>ac-tin-i-an</t></w>
-<w><t>ac-tin-ic</t></w>
-<w><t>ac-tin-i-cal-ly</t></w>
-<w><t>ac-ti-nide</t></w>
-<phrase><t>ac-ti-nide se-ries</t></phrase>
-<w><t>ac-tin-i-form</t></w>
-<w><t>ac-tin-ism</t></w>
-<w><t>ac-tin-i-um</t></w>
-<phrase><t>ac-tin-i-um se-ries</t></phrase>
-<w><t>ac-ti-no-ba-cil-li</t></w>
-<w><t>ac-ti-no-bac-il-lo-sis</t></w>
-<w><t>ac-ti-no-bac-il-lot-ic</t></w>
-<w><t>ac-ti-no-ba-cil-lus</t></w>
-<w><t>ac-ti-no-chem-i-cal</t></w>
-<w><t>ac-tin-o-chem-is-try</t></w>
-<w><t>ac-ti-no-chem-is-try</t></w>
-<w><t>ac-ti-no-der-ma-ti-tis</t></w>
-<w><t>ac-tin-o-drome</t></w>
-<w><t>ac-ti-nod-ro-mous</t></w>
-<w><t>ac-tin-o-gram</t></w>
-<w><t>ac-tin-o-graph</t></w>
-<w><t>ac-tin-o-graph-ic</t></w>
-<w><t>ac-ti-nog-ra-phy</t></w>
-<w><t>ac-ti-noid</t></w>
-<w><t>ac-tin-o-lite</t></w>
-<w><t>ac-tin-o-lit-ic</t></w>
-<w><t>ac-ti-nol-o-gy</t></w>
-<w><t>ac-ti-no-mere</t></w>
-<w><t>ac-ti-nom-e-ter</t></w>
-<w><t>ac-ti-no-met-ric</t></w>
-<w><t>ac-ti-nom-e-try</t></w>
-<w><t>ac-ti-no-mor-phic</t></w>
-<w><t>ac-ti-no-mor-phous</t></w>
-<w><t>ac-ti-no-mor-phy</t></w>
-<w><t>ac-ti-no-my-ces</t></w>
-<w><t>ac-ti-no-my-cete</t></w>
-<w><t>ac-tin-o-my-cet-ous</t></w>
-<w><t>ac-ti-no-my-cin</t></w>
-<w><t>ac-ti-no-my-co-sis</t></w>
-<w><t>ac-ti-no-my-cot-ic</t></w>
-<w><t>ac-ti-non</t></w>
-<w><t>ac-tin-o-pod</t></w>
-<w><t>ac-ti-nop-te-ryg-i-an</t></w>
-<w><t>ac-ti-no-ther-a-py</t></w>
-<w><t>ac-ti-no-u-ra-ni-um</t></w>
-<w><t>ac-ti-no-zo-an</t></w>
-<w><t>ac-tion</t></w>
-<phrase><t>ac-tion paint-ing</t></phrase>
-<phrase><t>ac-tion po-ten-tial</t></phrase>
-<phrase><t>ac-tion re-play</t></phrase>
-<phrase><t>ac-tion sta-tions</t></phrase>
-<w><t>ac-tion-a-ble</t></w>
-<w><t>ac-tion-a-bly</t></w>
-<w><t>ac-tion-less</t></w>
-<w><t>Ac-tis</t></w>
-<w><t>Ac-ti-um</t></w>
-<w><t>ac-ti-vate</t></w>
-<w><t>ac-ti-vat-ed</t></w>
-<phrase><t>ac-ti-vat-ed a-lu-mi-na</t></phrase>
-<phrase><t>ac-ti-vat-ed car-bon</t></phrase>
-<phrase><t>ac-ti-vat-ed sludge</t></phrase>
-<w><t>ac-ti-vat-ing</t></w>
-<w><t>ac-ti-va-tion</t></w>
-<w><t>ac-ti-va-tor</t></w>
-<w><t>ac-tive</t></w>
-<phrase><t>ac-tive du-ty</t></phrase>
-<phrase><t>ac-tive list</t></phrase>
-<phrase><t>ac-tive serv-ice</t></phrase>
-<w><t>ac-tive-ly</t></w>
-<w><t>ac-tive-ness</t></w>
-<w><t>ac-tiv-ism</t></w>
-<w><t>ac-tiv-ist</t></w>
-<w><t>ac-tiv-i-ty</t></w>
-<w><t>ac-tiv-ize</t></w>
-<w><t>ac-tiv-ized</t></w>
-<w><t>ac-tiv-iz-ing</t></w>
-<w><t>ac-to-my-o-sin</t></w>
-<w><t>Ac-ton</t></w>
-<w><t>ac-ton</t></w>
-<w><t>Ac-tor</t></w>
-<w><t>ac-tor</t></w>
-<w><t>ac-tor=proof</t></w>
-<w><t>Ac-tor-i-dae</t></w>
-<w><t>ac-tress</t></w>
-<w><t>ac-tu-al</t></w>
-<w><t>ac-tu-al-ise</t></w>
-<w><t>ac-tu-al-ised</t></w>
-<w><t>ac-tu-al-is-ing</t></w>
-<w><t>ac-tu-al-ism</t></w>
-<w><t>ac-tu-al-ist</t></w>
-<w><t>ac-tu-al-is-tic</t></w>
-<w><t>ac-tu-al-i-ty</t></w>
-<w><t>ac-tu-al-i-za-tion</t></w>
-<w><t>ac-tu-al-ize</t></w>
-<w><t>ac-tu-al-ized</t></w>
-<w><t>ac-tu-al-iz-ing</t></w>
-<w><t>ac-tu-al-ly</t></w>
-<w><t>ac-tu-al-ness</t></w>
-<w><t>ac-tu-ar-i-al</t></w>
-<w><t>ac-tu-ar-i-al-ly</t></w>
-<w><t>ac-tu-ar-ies</t></w>
-<w><t>ac-tu-ary</t></w>
-<w><t>ac-tu-ar-y</t></w>
-<w><t>ac-tu-ate</t></w>
-<w><t>ac-tu-at-ed</t></w>
-<w><t>ac-tu-at-ing</t></w>
-<w><t>ac-tu-a-tion</t></w>
-<w><t>ac-tu-a-tor</t></w>
-<w><t>ac-u-ate</t></w>
-<w><t>a-cu-i-ty</t></w>
-<w><t>a-cu-le-ate</t></w>
-<w><t>a-cu-le-at-ed</t></w>
-<w><t>a-cu-le-i</t></w>
-<w><t>a-cu-le-us</t></w>
-<w><t>ac-u-men</t></w>
-<w><t>a-cu-men</t></w>
-<w><t>a-cu-mi-nate</t></w>
-<w><t>a-cu-mi-nat-ed</t></w>
-<w><t>a-cu-mi-nat-ing</t></w>
-<w><t>a-cu-mi-na-tion</t></w>
-<w><t>a-cu-mi-nous</t></w>
-<w><t>ac-u-punc-ture</t></w>
-<w><t>ac-u-punc-tured</t></w>
-<w><t>ac-u-punc-tur-ing</t></w>
-<w><t>a-cus</t></w>
-<w><t>ac-u-sec-tion</t></w>
-<w><t>ac-u-sec-tor</t></w>
-<w><t>a-cut-ance</t></w>
-<w><t>a-cute</t></w>
-<phrase><t>a-cute ac-cent</t></phrase>
-<phrase><t>a-cute arch</t></phrase>
-<w><t>a-cute-ly</t></w>
-<w><t>a-cute-ness</t></w>
-<w><t>a-cu-ti-lin-gual</t></w>
-<w><t>a-cy-clic</t></w>
-<w><t>ac-yl</t></w>
-<w><t>a-cyl</t></w>
-<w><t>ac-yl-ate</t></w>
-<w><t>ac-yl-at-ed</t></w>
-<w><t>ac-yl-at-ing</t></w>
-<w><t>ac-yl-a-tion</t></w>
-<w><t>a-cyl-o-in</t></w>
-<phrase><t>ad ho-mi-nem</t></phrase>
-<phrase><t>ad in-fi-ni-tum</t></phrase>
-<phrase><t>ad in-ter-im</t></phrase>
-<phrase><t>ad li-tem</t></phrase>
-<phrase><t>ad nau-se-am</t></phrase>
-<phrase><t>ad va-lo-rem</t></phrase>
-<w><t>ad=lib</t></w>
-<w><t>A-da</t></w>
-<w><t>A-da-bel</t></w>
-<w><t>A-da-belle</t></w>
-<w><t>a-dac-ty-lous</t></w>
-<w><t>ad-age</t></w>
-<w><t>a-da-gi-al</t></w>
-<w><t>a-da-giet-to</t></w>
-<w><t>a-da-gio</t></w>
-<w><t>a-da-gi-o</t></w>
-<w><t>a-da-gis-si-mo</t></w>
-<w><t>A-dah</t></w>
-<w><t>A-dair</t></w>
-<w><t>A-dal</t></w>
-<w><t>Ad-al-bert</t></w>
-<w><t>Ad-am</t></w>
-<phrase><t>Ad-am's ap-ple</t></phrase>
-<w><t>Ad-am's=nee-dle</t></w>
-<w><t>Ad-am=and=Eve</t></w>
-<w><t>Ad-a-ma</t></w>
-<w><t>ad-a-mant</t></w>
-<w><t>ad-a-man-tine</t></w>
-<w><t>Ad-a-mas</t></w>
-<w><t>Ad-a-ma-wa</t></w>
-<w><t>Ad-am-ic</t></w>
-<w><t>A-dam-ic</t></w>
-<w><t>A-dam-i-cal</t></w>
-<w><t>A-dam-i-cal-ly</t></w>
-<w><t>Ad-am-ite</t></w>
-<w><t>Ad-am-it-ic</t></w>
-<w><t>Ad-ams</t></w>
-<phrase><t>Ad-ams=Stokes syn-drome</t></phrase>
-<w><t>ad-ams-ite</t></w>
-<w><t>A-da-na</t></w>
-<w><t>A-da-pa</t></w>
-<w><t>a-dapt</t></w>
-<w><t>a-dapt-a-bil-i-ty</t></w>
-<w><t>a-dapt-a-ble</t></w>
-<w><t>a-dapt-a-ble-ness</t></w>
-<w><t>ad-ap-ta-tion</t></w>
-<w><t>ad-ap-ta-tion-al</t></w>
-<w><t>ad-ap-ta-tion-al-ly</t></w>
-<w><t>a-dapt-ed-ness</t></w>
-<w><t>a-dapt-er</t></w>
-<w><t>a-dap-tion</t></w>
-<w><t>a-dap-tive</t></w>
-<phrase><t>a-dap-tive ra-di-a-tion</t></phrase>
-<w><t>a-dap-tive-ly</t></w>
-<w><t>a-dap-tive-ness</t></w>
-<w><t>a-dap-tor</t></w>
-<w><t>A-dar</t></w>
-<phrase><t>A-dar She-ni</t></phrase>
-<w><t>a-dat</t></w>
-<w><t>ad-ax-i-al</t></w>
-<w><t>add</t><verb><regular-root/></verb></w>
-<w><t>add-a-ble</t></w>
-<w><t>Ad-dams</t></w>
-<w><t>ad-dax</t></w>
-<phrase><t>add-ed sixth</t></phrase>
-<w><t>add-ed-ly</t></w>
-<w><t>ad-dend</t></w>
-<w><t>ad-den-dum</t></w>
-<w><t>add-er</t></w>
-<w><t>ad-der</t></w>
-<w><t>ad-der's=meat</t></w>
-<w><t>ad-der's=mouth</t></w>
-<w><t>ad-der's=tongue</t></w>
-<w><t>add-i-ble</t></w>
-<w><t>ad-dict</t></w>
-<w><t>ad-dict-ed</t></w>
-<w><t>ad-dict-ed-ness</t></w>
-<w><t>ad-dic-tion</t></w>
-<w><t>ad-dic-tive</t></w>
-<w><t>Ad-die</t></w>
-<phrase><t>add-ing ma-chine</t></phrase>
-<w><t>Ad-ding-ton</t></w>
-<phrase><t>Ad-dis Ab-a-ba</t></phrase>
-<w><t>Ad-di-son</t></w>
-<phrase><t>Ad-di-son's dis-ease</t></phrase>
-<w><t>Ad-di-so-ni-an</t></w>
-<w><t>ad-dit-a-ment</t></w>
-<w><t>ad-dit-a-men-ta-ry</t></w>
-<w><t>ad-di-tion</t></w>
-<w><t>ad-di-tion-al</t></w>
-<w><t>ad-di-tion-al-ly</t></w>
-<w><t>ad-di-tive</t></w>
-<w><t>ad-di-tive-ly</t></w>
-<w><t>ad-di-to-ry</t></w>
-<w><t>ad-dle</t></w>
-<w><t>ad-dle-brained</t></w>
-<w><t>ad-dle-pat-ed</t></w>
-<w><t>ad-dorsed</t></w>
-<w><t>ad-dress</t></w>
-<w><t>ad-dress-ee</t></w>
-<w><t>ad-dress-er</t></w>
-<w><t>ad-dress-ing</t></w>
-<w><t>Ad-dres-so-graph</t></w>
-<w><t>ad-dres-sor</t></w>
-<w><t>ad-drest</t></w>
-<w><t>ad-duce</t></w>
-<w><t>ad-duce-a-ble</t></w>
-<w><t>ad-duced</t></w>
-<w><t>ad-du-cent</t></w>
-<w><t>ad-duc-er</t></w>
-<w><t>ad-duc-i-ble</t></w>
-<w><t>ad-duc-ing</t></w>
-<w><t>ad-duct</t></w>
-<w><t>ad-duc-tion</t></w>
-<w><t>ad-duc-tive</t></w>
-<w><t>ad-duc-tor</t></w>
-<w><t>ad-dy</t></w>
-<w><t>Ad-ee</t></w>
-<w><t>A-del</t></w>
-<w><t>A-del-a</t></w>
-<w><t>Ad-e-laide</t></w>
-<w><t>a-de-lan-ta-do</t></w>
-<w><t>Ad-el-bert</t></w>
-<w><t>A-dele</t></w>
-<w><t>Ad-el-heid</t></w>
-<w><t>Ad-e-li-na</t></w>
-<w><t>A-de-li-na</t></w>
-<w><t>Ad-e-line</t></w>
-<w><t>A-del-phe</t></w>
-<w><t>a-demp-tion</t></w>
-<w><t>A-den</t></w>
-<w><t>A-de-na</t></w>
-<w><t>ad-e-nal-gia</t></w>
-<w><t>A-den-au-er</t></w>
-<w><t>A-de-nau-er</t></w>
-<w><t>ad-e-nec-to-my</t></w>
-<w><t>ad-e-nine</t></w>
-<w><t>ad-e-ni-tis</t></w>
-<w><t>ad-e-no-car-ci-no-ma</t></w>
-<w><t>ad-e-no-car-ci-no-mas</t></w>
-<w><t>ad-e-no-car-ci-no-ma-ta</t></w>
-<w><t>ad-e-no-car-ci-nom-a-tous</t></w>
-<w><t>ad-e-no-hy-poph-y-sis</t></w>
-<w><t>ad-e-noid</t></w>
-<w><t>ad-e-noi-dal</t></w>
-<w><t>ad-e-noid-ec-to-my</t></w>
-<w><t>ad-e-noids</t></w>
-<w><t>ad-en-o-log-i-cal</t></w>
-<w><t>ad-e-nol-o-gy</t></w>
-<w><t>ad-e-no-ma</t></w>
-<w><t>ad-e-no-mas</t></w>
-<w><t>ad-e-no-ma-ta</t></w>
-<w><t>ad-e-nom-a-tous</t></w>
-<w><t>a-den-o-phore</t></w>
-<w><t>ad-e-no-phyl-lous</t></w>
-<w><t>ad-e-no-sar-co-ma</t></w>
-<w><t>ad-e-no-sar-co-mas</t></w>
-<w><t>ad-e-no-sar-co-ma-ta</t></w>
-<w><t>a-den-o-sine</t></w>
-<phrase><t>a-den-o-sine tri-phos-phate</t></phrase>
-<w><t>ad-e-no-vi-rus</t></w>
-<w><t>ad-e-no-vi-rus-es</t></w>
-<w><t>ad-e-nyl-py-ro-phos-phate</t></w>
-<w><t>ad-e-pha-gia</t></w>
-<w><t>ad-ept</t></w>
-<w><t>a-dept</t></w>
-<w><t>a-dept-ly</t></w>
-<w><t>a-dept-ness</t></w>
-<w><t>ad-e-qua-cy</t></w>
-<w><t>ad-e-quate</t></w>
-<w><t>ad-e-quate-ly</t></w>
-<w><t>ad-e-quate-ness</t></w>
-<w><t>a-der-min</t></w>
-<w><t>a-der-mine</t></w>
-<w><t>ad-es-sive</t></w>
-<w><t>ad-freeze</t></w>
-<w><t>ad-freez-ing</t></w>
-<w><t>ad-froze</t></w>
-<w><t>ad-fro-zen</t></w>
-<w><t>ad-here</t></w>
-<w><t>ad-hered</t></w>
-<w><t>ad-her-ence</t></w>
-<w><t>ad-her-end</t></w>
-<w><t>ad-her-ent</t></w>
-<w><t>ad-her-ent-ly</t></w>
-<w><t>ad-her-er</t></w>
-<w><t>ad-her-ing</t></w>
-<w><t>ad-he-sion</t></w>
-<w><t>ad-he-sion-al</t></w>
-<w><t>ad-he-sive</t></w>
-<w><t>ad-he-sive-ly</t></w>
-<w><t>ad-he-sive-ness</t></w>
-<w><t>ad-hib-it</t></w>
-<w><t>ad-hi-bi-tion</t></w>
-<w><t>ad-i-a-bat</t></w>
-<w><t>ad-i-a-bat-ic</t></w>
-<w><t>ad-i-a-bat-i-cal-ly</t></w>
-<w><t>a-di-ac-tin-ic</t></w>
-<w><t>ad-i-ad-o-cho-ki-ne-sia</t></w>
-<w><t>ad-i-ad-o-cho-ki-ne-sis</t></w>
-<w><t>ad-i-ad-o-ko-ki-ne-sia</t></w>
-<w><t>ad-i-ad-o-ko-ki-ne-sis</t></w>
-<w><t>ad-i-aph-o-re-sis</t></w>
-<w><t>ad-i-aph-o-ret-ic</t></w>
-<w><t>ad-i-aph-or-ism</t></w>
-<w><t>ad-i-aph-o-rist</t></w>
-<w><t>ad-i-aph-o-ris-tic</t></w>
-<w><t>ad-i-aph-o-rous</t></w>
-<w><t>ad-i-a-ther-man-cy</t></w>
-<w><t>A-die</t></w>
-<w><t>ad-i-ent</t></w>
-<w><t>a-dieu</t></w>
-<w><t>a-dieus</t></w>
-<w><t>a-dieux</t></w>
-<w><t>A-di-ge</t></w>
-<w><t>A-di-ghe</t></w>
-<w><t>A-di-granth</t></w>
-<w><t>A-din</t></w>
-<w><t>A-di-na</t></w>
-<w><t>ad-i-os</t></w>
-<w><t>a-di-os</t></w>
-<w><t>ad-i-pate</t></w>
-<w><t>a-diph-e-nine</t></w>
-<w><t>ad-i-po-cere</t></w>
-<w><t>ad-i-poc-er-ite</t></w>
-<w><t>ad-i-poc-er-ous</t></w>
-<w><t>ad-i-po-ni-trile</t></w>
-<w><t>ad-i-po-pec-tic</t></w>
-<w><t>ad-i-po-pex-i-a</t></w>
-<w><t>ad-i-po-pex-ic</t></w>
-<w><t>ad-i-po-pex-is</t></w>
-<w><t>ad-i-pose</t></w>
-<phrase><t>ad-i-pose fin</t></phrase>
-<w><t>ad-i-pose-ness</t></w>
-<w><t>ad-i-pos-i-ty</t></w>
-<w><t>Ad-i-ron-dack</t></w>
-<phrase><t>Ad-i-ron-dack Moun-tains</t></phrase>
-<w><t>Ad-i-ron-dacks</t></w>
-<w><t>ad-it</t></w>
-<w><t>A-dit-ya</t></w>
-<w><t>A-di-va-si</t></w>
-<w><t>adj</t></w>
-<w><t>ad-ja-cence</t></w>
-<w><t>ad-ja-cen-cy</t></w>
-<w><t>ad-ja-cent</t></w>
-<w><t>ad-ja-cent-ly</t></w>
-<w><t>ad-jec-ti-val</t></w>
-<w><t>ad-jec-ti-val-ly</t></w>
-<w><t>ad-jec-tive</t></w>
-<w><t>ad-jec-tively</t></w>
-<w><t>ad-join</t></w>
-<w><t>ad-join-ing</t></w>
-<w><t>ad-joint</t></w>
-<w><t>ad-journ</t></w>
-<w><t>ad-journ-ment</t></w>
-<w><t>adjt</t></w>
-<w><t>ad-judge</t></w>
-<w><t>ad-judged</t></w>
-<w><t>ad-judg-ing</t></w>
-<w><t>ad-ju-di-cate</t></w>
-<w><t>ad-ju-di-cat-ed</t></w>
-<w><t>ad-ju-di-cat-ing</t></w>
-<w><t>ad-ju-di-ca-tion</t></w>
-<w><t>ad-ju-di-ca-tive</t></w>
-<w><t>ad-ju-di-ca-tor</t></w>
-<w><t>ad-ju-gate</t></w>
-<w><t>ad-junct</t></w>
-<w><t>ad-junc-tion</t></w>
-<w><t>ad-junc-tive</t></w>
-<w><t>ad-junc-tive-ly</t></w>
-<w><t>ad-junct-ly</t></w>
-<w><t>ad-ju-ra-tion</t></w>
-<w><t>ad-jur-a-to-ry</t></w>
-<w><t>ad-jure</t></w>
-<w><t>ad-jured</t></w>
-<w><t>ad-jur-er</t></w>
-<w><t>ad-jur-ing</t></w>
-<w><t>ad-ju-ror</t></w>
-<w><t>ad-just</t></w>
-<w><t>ad-just-a-ble</t></w>
-<w><t>ad-just-a-ble=pitch</t></w>
-<w><t>ad-just-a-bly</t></w>
-<w><t>ad-just-er</t></w>
-<w><t>ad-just-ment</t></w>
-<w><t>ad-just-ment-al</t></w>
-<w><t>ad-jus-tor</t></w>
-<w><t>ad-ju-tan-cy</t></w>
-<w><t>ad-ju-tant</t></w>
-<phrase><t>ad-ju-tant bird</t></phrase>
-<phrase><t>ad-ju-tant gen-er-al</t></phrase>
-<w><t>ad-ju-vant</t></w>
-<w><t>Ad-lai</t></w>
-<w><t>Ad-ler</t></w>
-<w><t>Ad-le-ri-an</t></w>
-<w><t>Ad-ley</t></w>
-<phrase><t>A-d-lie Coast</t></phrase>
-<w><t>Ad-mah</t></w>
-<w><t>ad-man</t></w>
-<w><t>ad-mass</t></w>
-<w><t>ad-meas-ure</t></w>
-<w><t>ad-meas-ured</t></w>
-<w><t>ad-meas-ure-ment</t></w>
-<w><t>ad-meas-ur-er</t></w>
-<w><t>ad-meas-ur-ing</t></w>
-<w><t>Ad-me-te</t></w>
-<w><t>Ad-me-tus</t></w>
-<w><t>ad-min</t></w>
-<w><t>ad-min-i-cle</t></w>
-<w><t>ad-mi-nic-u-lar</t></w>
-<w><t>ad-min-is-ter</t></w>
-<w><t>ad-min-is-tra-ble</t></w>
-<w><t>ad-min-is-trant</t></w>
-<w><t>ad-min-is-trate</t></w>
-<w><t>ad-min-is-trat-ed</t></w>
-<w><t>ad-min-is-trat-ing</t></w>
-<w><t>ad-min-is-tra-tion</t></w>
-<w><t>ad-min-is-tra-tion-al</t></w>
-<w><t>ad-min-is-tra-tive</t></w>
-<w><t>ad-min-is-tra-tive-ly</t></w>
-<w><t>ad-min-is-tra-tor</t></w>
-<w><t>ad-min-is-tra-tor-ship</t></w>
-<w><t>ad-min-is-tra-tri-ces</t></w>
-<w><t>ad-min-is-tra-trix</t></w>
-<w><t>ad-mi-ra-bil-i-ty</t></w>
-<w><t>ad-mi-ra-ble</t></w>
-<w><t>ad-mi-ra-ble-ness</t></w>
-<w><t>ad-mi-ra-bly</t></w>
-<w><t>ad-mi-ral</t></w>
-<w><t>Ad-mi-ral</t></w>
-<w><t>ad-mi-ral-ship</t></w>
-<w><t>ad-mi-ral-ty</t></w>
-<phrase><t>Ad-mi-ral-ty Board</t></phrase>
-<phrase><t>Ad-mi-ral-ty House</t></phrase>
-<phrase><t>Ad-mi-ral-ty Is-lands</t></phrase>
-<phrase><t>Ad-mi-ral-ty mile</t>...
[truncated message content] |
|
From: <vic...@us...> - 2022-06-17 19:51:34
|
Revision: 12657
http://sourceforge.net/p/foray/code/12657
Author: victormote
Date: 2022-06-17 19:51:18 +0000 (Fri, 17 Jun 2022)
Log Message:
-----------
Dictionary additions.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-17 18:41:55 UTC (rev 12656)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-17 19:51:18 UTC (rev 12657)
@@ -8388,7 +8388,7 @@
<w><t>ap-peal-ing</t><adjective/></w>
<w><t>ap-peal-ing-ly</t></w>
<w><t>ap-peal-ing-ness</t></w>
-<w><t>ap-pear</t></w>
+<w><t>ap-pear</t><verb><regular-root/></verb></w>
<w><t>ap-pear-ance</t></w>
<w><t>ap-peas-a-ble</t></w>
<w><t>ap-peas-a-ble-ness</t></w>
@@ -32207,7 +32207,7 @@
<w><t>con-so-cies</t></w>
<w><t>con-sol</t></w>
<w><t>con-sol-a-ble</t></w>
-<w><t>con-so-la-tion</t></w>
+<w><t>con-so-la-tion</t><noun><pluralizable/></noun></w>
<phrase><t>con-so-la-tion prize</t></phrase>
<w><t>con-sol-a-to-ry</t></w>
<w><t>con-sole</t></w>
@@ -57113,7 +57113,7 @@
<w><t>fol</t></w>
<w><t>fol-a-cin</t></w>
<w><t>Fol-croft</t></w>
-<w><t>fold</t></w>
+<w><t>fold</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>fold-a-ble</t></w>
<w><t>fold-a-way</t></w>
<w><t>fold-boat</t></w>
@@ -63718,6 +63718,7 @@
<phrase><t>grand si-cle</t></phrase>
<phrase><t>grand vi-zier</t></phrase>
<w><t>grand=du-cal</t></w>
+<w><t>grand=neph-ew</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>grand=slam-mer</t></w>
<w><t>gran-dam</t></w>
<w><t>gran-dame</t></w>
@@ -63752,7 +63753,6 @@
<phrase><t>grand-moth-er clock</t></phrase>
<w><t>grand-moth-er-li-ness</t></w>
<w><t>grand-moth-er-ly</t></w>
-<w><t>grand=neph-ew</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>grand-ness</t></w>
<w><t>grand-niece</t></w>
<w><t>grand-pa</t></w>
@@ -101838,7 +101838,7 @@
<w><t>no-bil-i-a-ry</t></w>
<phrase><t>no-bil-i-a-ry par-ti-cle</t></phrase>
<w><t>no-bil-i-ty</t></w>
-<w><t>no-ble</t></w>
+<w><t>no-ble</t><adjective/></w>
<phrase><t>no-ble art</t></phrase>
<phrase><t>no-ble sav-age</t></phrase>
<w><t>no-ble=mind-ed</t></w>
@@ -101852,6 +101852,7 @@
<w><t>No-bles-ville</t></w>
<w><t>no-ble-wom-an</t></w>
<w><t>no-ble-wom-en</t></w>
+<w><t>no-bly</t><adverb/></w>
<w><t>no-bod-y</t></w>
<w><t>No-bu-su-ke</t></w>
<w><t>no-car-di-a</t></w>
@@ -110185,6 +110186,7 @@
<w><t>orle</t></w>
<w><t>Or-le-an-ism</t></w>
<w><t>Or-le-an-ist</t></w>
+<w><t>Or-le-ans</t><noun/></w>
<w><t>or-let</t></w>
<w><t>Or-lich</t></w>
<w><t>Or-lin</t></w>
@@ -114960,7 +114962,7 @@
<w><t>Pa-pe-e-te</t></w>
<w><t>pa-pe-le-ra</t></w>
<w><t>Pa-pen</t></w>
-<w><t>pa-per</t></w>
+<w><t>pa-per</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<phrase><t>pa-per chase</t></phrase>
<phrase><t>pa-per mon-ey</t></phrase>
<phrase><t>pa-per mul-ber-ry</t></phrase>
@@ -129411,7 +129413,7 @@
<w><t>pub-li-ciz-ing</t></w>
<w><t>pub-lic-ly</t></w>
<w><t>pub-lic-ness</t></w>
-<w><t>pub-lish</t></w>
+<w><t>pub-lish</t><verb><regular-root/></verb></w>
<w><t>pub-lish-er</t></w>
<w><t>pub-lish-ing</t></w>
<w><t>pub-lish-ment</t></w>
@@ -137838,7 +137840,7 @@
<w><t>re-wak-en</t></w>
<w><t>re-wak-ing</t></w>
<w><t>re-wan</t></w>
-<w><t>re-ward</t></w>
+<w><t>re-ward</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>re-ward-ing</t></w>
<w><t>re-warm</t></w>
<w><t>re-warn</t></w>
@@ -158091,7 +158093,7 @@
<w><t>Sus-sex</t></w>
<phrase><t>Sus-sex span-iel</t></phrase>
<w><t>sus-so</t></w>
-<w><t>sus-tain</t></w>
+<w><t>sus-tain</t><verb><regular-root/></verb></w>
<w><t>sus-tain-a-ble</t></w>
<w><t>sus-tain-ed-ly</t></w>
<w><t>sus-tain-er</t></w>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-17 18:41:57
|
Revision: 12656
http://sourceforge.net/p/foray/code/12656
Author: victormote
Date: 2022-06-17 18:41:55 +0000 (Fri, 17 Jun 2022)
Log Message:
-----------
Add method to parse a string with language, country, and script components.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-06-17 18:01:17 UTC (rev 12655)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-06-17 18:41:55 UTC (rev 12656)
@@ -171,53 +171,45 @@
return find(language, script, country);
}
-// /**
-// * Parses a standard language string into its language, country, and script components, and finds or creates an
-// * instance of this class for those components.
-// * @param comboString The standard language string to be parsed, which may also have country and script components.
-// * @return The writing system for the given parameters.
-// */
-// public static WritingSystem4a find(final String comboString) {
-// if (comboString == null) {
-// return null;
-// }
-// final String[] components = comboString.split("-");
-// String language = null;
-// String country = null;
-// String script = null;
-// for (int index = 0; index < components.length; index ++) {
-//
-// }
-//
-//
-//
-//
-// /* Is there a country code? */
-// final String languageString = languageAndCountry[0];
-// String countryString = null;
-// if (languageAndCountry.length > 1) {
-// countryString = languageAndCountry[1];
-// }
-//
-// final Language4a language = Language4a.findFromAlpha(languageString);
-// final Country4a country = Country4a.findFromAlpha(countryString);
-// /* TODO: The following should not be hard-coded this way.
-// * Instead, either specify in the XML document (i.e. as an attribute on the element itself), or implied by
-// * the text content. */
-// final Script4a script = Script4a.LATIN;
-//
-// element.writingSystem = WritingSystem4a.find(language, script, country);
-//
-//
-//
-//
-//
-// final Language4a language = Language4a.findFromAlpha(languageString);
-// final Script4a script = Script4a.findFromAlpha(scriptString);
-// final Country4a country = Country4a.findFromAlpha(countryString);
-// return find(language, script, country);
-// }
+ /**
+ * Parses a "well-formed" standard language string into its language, country, and script components, and finds or
+ * creates an instance of this class for those components.
+ * By "well-formed
+ * @param comboString The standard language string to be parsed, which may also have country and script components.
+ * @return The writing system for the given parameters.
+ */
+ public static WritingSystem4a find(final String comboString) {
+ if (comboString == null) {
+ return null;
+ }
+ String language = null;
+ String country = null;
+ String script = null;
+ final String[] components = comboString.split("-");
+ for (int index = 0; index < components.length; index ++) {
+ final String component = components[index];
+ /* Don't throw an exception if duplicate parts are found, or if a given subtag does not match any of this
+ * patterns. There are possible extended language subtags, regions subtags, variant subtags, extension
+ * subtags, and private-use subtags that may use the same patterns. Since we are checking them in the
+ * specified order (language, script, region/country), we should catch the correct value if it is there. */
+ if (Language4a.matchesPattern(component)) {
+ if (language == null) {
+ language = component;
+ }
+ } else if (Country4a.matchesPattern(component)) {
+ if (country == null) {
+ country = component;
+ }
+ } else if (Script4a.matchesPattern(component)) {
+ if (script == null) {
+ script = component;
+ }
+ }
+ }
+ return find(language, country, script);
+ }
+
@Override
public Language4a getLanguage() {
return this.language;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-17 18:01:20
|
Revision: 12655
http://sourceforge.net/p/foray/code/12655
Author: victormote
Date: 2022-06-17 18:01:17 +0000 (Fri, 17 Jun 2022)
Log Message:
-----------
Add methods checking whether a given string matches the patterns for language, country, and script.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java
Added Paths:
-----------
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java
trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java 2022-06-14 22:02:44 UTC (rev 12654)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Country4a.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -32,6 +32,8 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* FOray implementation of {@link Country}, country codes using the ISO-3166 standard.
@@ -39,9 +41,8 @@
*/
public final class Country4a implements Country {
- /** A country code suitable for cases where one is not known. The 2-digit, 3-digit, and numeric values were
- * assigned by FOray for its own convenience, and are not sanctioned by any standards-setting body. */
- public static final Country4a UNDETERMINED = new Country4a("UNDETERMINED", "99", "999", Short.MAX_VALUE);
+ /** A country code suitable for cases where one is not known. */
+ public static final Country4a UNDETERMINED;
/** The United States of America. */
public static final Country4a USA;
@@ -67,6 +68,18 @@
/** Spain. */
public static final Country4a SPAIN;
+ /** The length, in chars, of the 2-character code. */
+ private static final int PATTERN_2CHAR_LENGTH = 2;
+
+ /** The length, in chars, of the 3-character code. */
+ private static final int PATTERN_3CHAR_LENGTH = 3;
+
+ /** Regular expression pattern for matching a 2-character code. */
+ private static final Pattern PATTERN_2CHAR = Pattern.compile("[A-Z]{2}");
+
+ /** Regular expression pattern for matching a 3-character code. */
+ private static final Pattern PATTERN_3CHAR = Pattern.compile("[A-Z]{3}");
+
/** The initial capacity of the data structures. */
private static final int INITIAL_CAPACITY = 300;
@@ -83,7 +96,10 @@
/* Checkstyle: Allow Magic Numbers that are hard-coded data. */
static {
- Country4a.register(UNDETERMINED);
+ /* For "UNDETERMINED," the 2-character, 3-character, and numeric values were assigned by FOray for its own
+ * convenience, and are not sanctioned by any standards-setting body. */
+ Country4a.register(new Country4a("UNDETERMINED", "ZZ", "ZZZ", Short.MAX_VALUE));
+
Country4a.register(new Country4a("AALAND ISLANDS", "AX", "ALA", (short) 248));
Country4a.register(new Country4a("AFGHANISTAN", "AF", "AFG", (short) 4));
Country4a.register(new Country4a("ALBANIA", "AL", "ALB", (short) 8));
@@ -327,6 +343,7 @@
Country4a.register(new Country4a("ZAMBIA", "ZM", "ZMB", (short) 894));
Country4a.register(new Country4a("ZIMBABWE", "ZW", "ZWE", (short) 716));
+ UNDETERMINED = Country4a.findFrom3Char("ZZZ");
USA = Country4a.findFrom3Char("USA");
FINLAND = Country4a.findFrom3Char("FIN");
HUNGARY = Country4a.findFrom3Char("HUN");
@@ -364,6 +381,14 @@
*/
public Country4a(final String englishName, final String alpha2Code, final String alpha3Code,
final short numericCode) {
+ if (! matches3CharacterPattern(alpha3Code)) {
+ final String template = "Alpha 3 code expected pattern: " + PATTERN_3CHAR.toString() + ", actual: %s";
+ throw new IllegalArgumentException(String.format(template, alpha3Code));
+ }
+ if (! matches2CharacterPattern(alpha2Code)) {
+ final String template = "Alpha 2 code expected pattern: " + PATTERN_2CHAR.toString() + ", actual: %s";
+ throw new IllegalArgumentException(String.format(template, alpha2Code));
+ }
this.englishName = englishName;
this.alpha2Code = alpha2Code;
this.alpha3Code = alpha3Code;
@@ -483,4 +508,58 @@
return this.alpha3Code.hashCode();
}
+ /**
+ * Indicates whether a given string fits the pattern of a 2-character country code.
+ * This does NOT validate the country code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "en-US-Latn" by helping to distinguish which part of the string could
+ * be a valid country code.
+ * @param testString The string to be tested, e.g. "US" or "RU".
+ * @return True if and only if {@code testString} fits the pattern of a 2-character country code, i.e. that it
+ * consists of exactly two uppercase characters from the Latin alphabet.
+ */
+ public static boolean matches2CharacterPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ final Matcher matcher = PATTERN_2CHAR.matcher(testString);
+ return matcher.matches();
+ }
+
+ /**
+ * Indicates whether a given string fits the pattern of a 3-character country code.
+ * This does NOT validate the country code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "eng-USA-Latn" by helping to distinguish which part of the string could
+ * be a valid country code.
+ * @param testString The string to be tested, e.g. "USA" or "RUS".
+ * @return True if and only if {@code testString} fits the pattern of a 3-character country code, i.e. that it
+ * consists of exactly two uppercase characters from the Latin alphabet.
+ */
+ public static boolean matches3CharacterPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ final Matcher matcher = PATTERN_3CHAR.matcher(testString);
+ return matcher.matches();
+ }
+
+ /**
+ * Indicates whether a given country code fits the pattern of either a 2-character or 3-character country code.
+ * This does NOT validate the country code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "eng-USA-Latn" by helping to distinguish which part of the string could
+ * be a valid country code.
+ * @param testString The country code to be tested, e.g. "US" or "RU" or "USA" or "RUS".
+ * @return True if and only if {@code testString} fits the pattern of either a 2-character or 3-character country
+ * code.
+ */
+ public static boolean matchesPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ switch (testString.length()) {
+ case PATTERN_2CHAR_LENGTH: return matches2CharacterPattern(testString);
+ case PATTERN_3CHAR_LENGTH: return matches3CharacterPattern(testString);
+ default: return false;
+ }
+ }
+
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-06-14 22:02:44 UTC (rev 12654)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Language4a.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -33,6 +33,8 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* FOray implementation of {@link Language}, language codes using the ISO-639 standard.
@@ -41,7 +43,7 @@
public final class Language4a implements Language {
/** The "undetermined" code. */
- public static final Language4a UNDETERMINED = new Language4a("und", null, "Undetermined", "indéterminée");
+ public static final Language4a UNDETERMINED;
/** The English language. */
public static final Language4a ENGLISH;
@@ -97,6 +99,18 @@
/** String constant used to eliminate duplicates. */
private static final String STRING_TWI = "twi";
+ /** The length, in chars, of the 2-character code. */
+ private static final int PATTERN_2CHAR_LENGTH = 2;
+
+ /** The length, in chars, of the 3-character code. */
+ private static final int PATTERN_3CHAR_LENGTH = 3;
+
+ /** Regular expression pattern for matching a 2-character code. */
+ private static final Pattern PATTERN_2CHAR = Pattern.compile("[a-z]{2}");
+
+ /** Regular expression pattern for matching a 3-character code. */
+ private static final Pattern PATTERN_3CHAR = Pattern.compile("[a-z]{3}");
+
/** The initial capacity of the data structures. */
private static final int INITIAL_CAPACITY = 600;
@@ -596,7 +610,7 @@
Language4a.register(new Language4a("uig", "ug", "Uighur; Uyghur", "ouïgour"));
Language4a.register(new Language4a("ukr", "uk", "Ukrainian", "ukrainien"));
Language4a.register(new Language4a("umb", null, "Umbundu", "umbundu"));
- Language4a.register(UNDETERMINED);
+ Language4a.register(new Language4a("und", null, "Undetermined", "indéterminée"));
Language4a.register(new Language4a("urd", "ur", "Urdu", "ourdou"));
Language4a.register(new Language4a("uzb", "uz", "Uzbek", "ouszbek"));
Language4a.register(new Language4a("vai", null, "Vai", "vaï"));
@@ -653,6 +667,7 @@
}
static {
+ UNDETERMINED = Language4a.findFrom3Char("und");
ENGLISH = Language4a.findFrom3Char("eng");
FINNISH = Language4a.findFrom3Char("fin");
HUNGARIAN = Language4a.findFrom3Char("hun");
@@ -688,6 +703,16 @@
*/
public Language4a(final String alpha3Code, final String alpha2Code, final String englishName,
final String frenchName) {
+ if (! matches3CharacterPattern(alpha3Code)) {
+ final String template = "Alpha 3 code expected pattern: " + PATTERN_3CHAR.toString() + ", actual: %s";
+ throw new IllegalArgumentException(String.format(template, alpha3Code));
+ }
+ /* Alpha 2 code can be null. */
+ if (alpha2Code != null
+ && ! matches2CharacterPattern(alpha2Code)) {
+ final String template = "Alpha 2 code expected pattern: " + PATTERN_2CHAR.toString() + ", actual: %s";
+ throw new IllegalArgumentException(String.format(template, alpha2Code));
+ }
this.alpha3Code = alpha3Code;
this.alpha2Code = alpha2Code;
this.englishName = englishName;
@@ -810,4 +835,58 @@
return this.alpha3Code.hashCode();
}
+ /**
+ * Indicates whether a given string fits the pattern of a 2-character language code.
+ * This does NOT validate the language code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "en-US-Latn" by helping to distinguish which part of the string could
+ * be a valid language code.
+ * @param testString The string to be tested, e.g. "en" or "ru".
+ * @return True if and only if {@code testString} fits the pattern of a 2-character language code, i.e. that it
+ * consists of exactly two lowercase characters from the Latin alphabet.
+ */
+ public static boolean matches2CharacterPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ final Matcher matcher = PATTERN_2CHAR.matcher(testString);
+ return matcher.matches();
+ }
+
+ /**
+ * Indicates whether a given string fits the pattern of a 3-character language code.
+ * This does NOT validate the language code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "eng-USA-Latn" by helping to distinguish which part of the string could
+ * be a valid language code.
+ * @param testString The string to be tested, e.g. "eng" or "rus".
+ * @return True if and only if {@code testString} fits the pattern of a 3-character language code, i.e. that it
+ * consists of exactly two lowercase characters from the Latin alphabet.
+ */
+ public static boolean matches3CharacterPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ final Matcher matcher = PATTERN_3CHAR.matcher(testString);
+ return matcher.matches();
+ }
+
+ /**
+ * Indicates whether a given string fits the pattern of either a 2-character or 3-character language code.
+ * This does NOT validate the language code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "eng-USA-Latn" by helping to distinguish which part of the string could
+ * be a valid language code.
+ * @param testString The language code to be tested, e.g. "en" or "ru" or "eng" or "rus".
+ * @return True if and only if {@code testString} fits the pattern of either a 2-character or 3-character language
+ * code.
+ */
+ public static boolean matchesPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ switch (testString.length()) {
+ case PATTERN_2CHAR_LENGTH: return matches2CharacterPattern(testString);
+ case PATTERN_3CHAR_LENGTH: return matches3CharacterPattern(testString);
+ default: return false;
+ }
+ }
+
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2022-06-14 22:02:44 UTC (rev 12654)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/Script4a.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -37,6 +37,8 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* FOray implementation of {@link Script}, script codes using the ISO-15924 standard.
@@ -45,6 +47,9 @@
*/
public final class Script4a implements Script {
+ /** The script representing an undetermined value. */
+ public static final Script4a UNDETERMINED;
+
/** The Latin script. */
public static final Script4a LATIN;
@@ -54,9 +59,8 @@
/** Constant return value for {@link #getIcu4jCode()}. */
private static final byte ICU4J_NOT_SUPPORTED = -2;
- /** The script representing an undetermined value. */
- public static final Script4a UNDETERMINED = new Script4a("Zyyy", (short) 998, "Code for undetermined script",
- "codet pour écriture indéterminée", ICU4J_NOT_SUPPORTED, null);
+ /** Regular expression pattern for matching a script code. */
+ private static final Pattern PATTERN = Pattern.compile("[A-Z][a-z]{3}");
/** The initial size of the data structures. */
private static final int INITIAL_CAPACITY = 150;
@@ -294,6 +298,8 @@
(byte) UScript.TIBETAN, UnicodeScript.TIBETAN));
Script4a.register(new Script4a("Ugar", (short) 040, "Ugaritic", "ougaritique",
(byte) UScript.UGARITIC, UnicodeScript.UGARITIC));
+ Script4a.register(new Script4a("Zyyy", (short) 998, "Code for undetermined script",
+ "codet pour écriture indéterminée", ICU4J_NOT_SUPPORTED, null));
Script4a.register(new Script4a("Vaii", (short) 470, "Vai", "vaï",
(byte) UScript.VAI, UnicodeScript.VAI));
Script4a.register(new Script4a("Visp", (short) 280, "Visible Speech", "parole visible",
@@ -308,11 +314,11 @@
Script4a.register(new Script4a(
"Zxxx", (short) 997, "Code for unwritten languages", "codet pour les langues non écrites",
(byte) UScript.UNWRITTEN_LANGUAGES, null));
- Script4a.register(Script4a.UNDETERMINED);
Script4a.register(new Script4a(
"Zzzz", (short) 999, "Code for uncoded script", "codet pour écriture non codée",
ICU4J_NOT_SUPPORTED, null));
+ UNDETERMINED = Script4a.findFromAlpha("Zyyy");
LATIN = Script4a.findFromAlpha("Latn");
CYRILLIC = Script4a.findFromAlpha("Cyrl");
}
@@ -352,6 +358,10 @@
*/
public Script4a(final String alpha, final short numeric, final String englishName, final String frenchName,
final byte icu4jCode, final UnicodeScript unicodeScript) {
+ if (! matchesPattern(alpha)) {
+ final String template = "Alpha expected pattern: " + PATTERN.toString() + ", actual: %s";
+ throw new IllegalArgumentException(String.format(template, alpha));
+ }
this.alphaCode = alpha;
this.numericCode = numeric;
this.englishName = englishName;
@@ -502,4 +512,21 @@
return this.alphaCode.hashCode();
}
+ /**
+ * Indicates whether a given string fits the pattern of a script code.
+ * This does NOT validate the script code, but only indicates that the pattern fits.
+ * This is useful when parsing a string like "en-US-Latn" by helping to distinguish which part of the string could
+ * be a valid script code.
+ * @param testString The string code to be tested, e.g. "Latn" or "Cyrl".
+ * @return True if and only if {@code testString} fits the pattern of a script code, i.e. that it consists of
+ * exactly one uppercase Latin character followed by exactly three lowercase characters Latin characters.
+ */
+ public static boolean matchesPattern(final CharSequence testString) {
+ if (testString == null) {
+ return false;
+ }
+ final Matcher matcher = PATTERN.matcher(testString);
+ return matcher.matches();
+ }
+
}
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-06-14 22:02:44 UTC (rev 12654)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/i18n/WritingSystem4a.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -122,7 +122,7 @@
* @param language The language.
* @param country The country.
* @param script The script.
- * @return The orthography for the given parameters.
+ * @return The writing system for the given parameters.
*/
public static WritingSystem4a find(final Language4a language, final Script4a script, final Country4a country) {
Script4a scriptToUse = script;
@@ -161,7 +161,7 @@
* @param languageString The language.
* @param countryString The country.
* @param scriptString The script.
- * @return The orthography for the given parameters.
+ * @return The writing system for the given parameters.
*/
public static WritingSystem4a find(final String languageString, final String scriptString,
final String countryString) {
@@ -171,6 +171,53 @@
return find(language, script, country);
}
+// /**
+// * Parses a standard language string into its language, country, and script components, and finds or creates an
+// * instance of this class for those components.
+// * @param comboString The standard language string to be parsed, which may also have country and script components.
+// * @return The writing system for the given parameters.
+// */
+// public static WritingSystem4a find(final String comboString) {
+// if (comboString == null) {
+// return null;
+// }
+// final String[] components = comboString.split("-");
+// String language = null;
+// String country = null;
+// String script = null;
+// for (int index = 0; index < components.length; index ++) {
+//
+// }
+//
+//
+//
+//
+// /* Is there a country code? */
+// final String languageString = languageAndCountry[0];
+// String countryString = null;
+// if (languageAndCountry.length > 1) {
+// countryString = languageAndCountry[1];
+// }
+//
+// final Language4a language = Language4a.findFromAlpha(languageString);
+// final Country4a country = Country4a.findFromAlpha(countryString);
+// /* TODO: The following should not be hard-coded this way.
+// * Instead, either specify in the XML document (i.e. as an attribute on the element itself), or implied by
+// * the text content. */
+// final Script4a script = Script4a.LATIN;
+//
+// element.writingSystem = WritingSystem4a.find(language, script, country);
+//
+//
+//
+//
+//
+// final Language4a language = Language4a.findFromAlpha(languageString);
+// final Script4a script = Script4a.findFromAlpha(scriptString);
+// final Country4a country = Country4a.findFromAlpha(countryString);
+// return find(language, script, country);
+// }
+
@Override
public Language4a getLanguage() {
return this.language;
Modified: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java 2022-06-14 22:02:44 UTC (rev 12654)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Country4aTests.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -44,4 +44,78 @@
Assert.assertEquals(840, Country4a.findFrom3Char("USA").getNumericCode());
}
+ /**
+ * Attempt to create instance with invalid 2-character code.
+ */
+ @Test
+ public void invalid2CharacterCodeTest() {
+ try {
+ new Country4a("Vulcan", "VUA", "VUL", (short) -999);
+ Assert.fail("Expected " + IllegalArgumentException.class.getName());
+ } catch (final IllegalArgumentException e) {
+ /* This is the expected case. Do nothing. */
+ }
+ }
+
+ /**
+ * Attempt to create instance with invalid 3-character code.
+ */
+ @Test
+ public void invalid3CharacterCodeTest() {
+ try {
+ new Country4a("Vulcan", "VU", "VULC", (short) -999);
+ Assert.fail("Expected " + IllegalArgumentException.class.getName());
+ } catch (final IllegalArgumentException e) {
+ /* This is the expected case. Do nothing. */
+ }
+ }
+
+ /**
+ * Tests of {@link Country4a#matches2CharacterPattern(CharSequence)}.
+ */
+ @Test
+ public void matches2CharacterPatternTests() {
+ /* String should match. */
+ Assert.assertTrue(Country4a.matches2CharacterPattern("AA"));
+
+ /* String too long. */
+ Assert.assertFalse(Country4a.matches2CharacterPattern("AAA"));
+
+ /* String too short. */
+ Assert.assertFalse(Country4a.matches2CharacterPattern("A"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Country4a.matches2CharacterPattern("aa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Country4a.matches2CharacterPattern("Aa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Country4a.matches2CharacterPattern("aA"));
+ }
+
+ /**
+ * Tests of {@link Country4a#matches2CharacterPattern(CharSequence)}.
+ */
+ @Test
+ public void matches3CharacterPatternTests() {
+ /* String should match. */
+ Assert.assertTrue(Country4a.matches3CharacterPattern("AAA"));
+
+ /* String too long. */
+ Assert.assertFalse(Country4a.matches3CharacterPattern("AAAA"));
+
+ /* String too short. */
+ Assert.assertFalse(Country4a.matches3CharacterPattern("AA"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Country4a.matches3CharacterPattern("Aaa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Country4a.matches3CharacterPattern("aAa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Country4a.matches3CharacterPattern("aaA"));
+ }
+
}
Added: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2016 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.i18n;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests of {@link Language4a}.
+ */
+public class Language4aTests {
+
+ /**
+ * Basic test to make sure the class loads properly and returns some basic information.
+ */
+ @Test
+ public void initTest() {
+ Assert.assertEquals("English", Language4a.findFrom3Char("eng").getEnglishName());
+ }
+
+ /**
+ * Attempt to create instance with invalid 2-character code.
+ */
+ @Test
+ public void invalid2CharacterCodeTest() {
+ try {
+ new Language4a("VUA", "VUL", "Vulcan", "Vulcán");
+ Assert.fail("Expected " + IllegalArgumentException.class.getName());
+ } catch (final IllegalArgumentException e) {
+ /* This is the expected case. Do nothing. */
+ }
+ }
+
+ /**
+ * Attempt to create instance with invalid 3-character code.
+ */
+ @Test
+ public void invalid3CharacterCodeTest() {
+ try {
+ new Language4a("VU", "VULC", "Vulcan", "Vulcán");
+ Assert.fail("Expected " + IllegalArgumentException.class.getName());
+ } catch (final IllegalArgumentException e) {
+ /* This is the expected case. Do nothing. */
+ }
+ }
+
+ /**
+ * Tests of {@link Language4a#matches2CharacterPattern(CharSequence)}.
+ */
+ @Test
+ public void matches2CharacterPatternTests() {
+ /* String should match. */
+ Assert.assertTrue(Language4a.matches2CharacterPattern("aa"));
+
+ /* String too long. */
+ Assert.assertFalse(Language4a.matches2CharacterPattern("aaa"));
+
+ /* String too short. */
+ Assert.assertFalse(Language4a.matches2CharacterPattern("a"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Language4a.matches2CharacterPattern("AA"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Language4a.matches2CharacterPattern("aA"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Language4a.matches2CharacterPattern("Aa"));
+ }
+
+ /**
+ * Tests of {@link Language4a#matches2CharacterPattern(CharSequence)}.
+ */
+ @Test
+ public void matches3CharacterPatternTests() {
+ /* String should match. */
+ Assert.assertTrue(Language4a.matches3CharacterPattern("aaa"));
+
+ /* String too long. */
+ Assert.assertFalse(Language4a.matches3CharacterPattern("aaaa"));
+
+ /* String too short. */
+ Assert.assertFalse(Language4a.matches3CharacterPattern("aa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Language4a.matches3CharacterPattern("aAA"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Language4a.matches3CharacterPattern("AaA"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Language4a.matches3CharacterPattern("AAa"));
+ }
+
+}
Property changes on: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Language4aTests.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Added: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
===================================================================
--- trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java (rev 0)
+++ trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java 2022-06-17 18:01:17 UTC (rev 12655)
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2016 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common.i18n;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests of {@link Script4a}.
+ */
+public class Script4aTests {
+
+ /**
+ * Basic test to make sure the class loads properly and returns some basic information.
+ */
+ @Test
+ public void initTest() {
+ Assert.assertEquals(215, Script4a.findFromAlpha("Latn").getNumericCode());
+ }
+
+ /**
+ * Attempt to create instance with invalid code.
+ */
+ @Test
+ public void invalidPatternTest() {
+ try {
+ new Script4a("VULC", (short) -999, "VulcanScript", "VulcánScript", (byte) -1, null);
+ Assert.fail("Expected " + IllegalArgumentException.class.getName());
+ } catch (final IllegalArgumentException e) {
+ /* This is the expected case. Do nothing. */
+ }
+ }
+
+ /**
+ * Tests of {@link Script4a#matchesPattern(CharSequence)}.
+ */
+ @Test
+ public void matchesPatternTests() {
+ /* String should match. */
+ Assert.assertTrue(Script4a.matchesPattern("Aaaa"));
+
+ /* String too long. */
+ Assert.assertFalse(Script4a.matchesPattern("Aaaaa"));
+
+ /* String too short. */
+ Assert.assertFalse(Script4a.matchesPattern("Aaa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Script4a.matchesPattern("aAAA"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Script4a.matchesPattern("AAaa"));
+
+ /* Wrong case. */
+ Assert.assertFalse(Script4a.matchesPattern("AAAa"));
+ }
+
+}
Property changes on: trunk/foray/foray-common/src/test/java/org/foray/common/i18n/Script4aTests.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-14 22:02:47
|
Revision: 12654
http://sourceforge.net/p/foray/code/12654
Author: victormote
Date: 2022-06-14 22:02:44 +0000 (Tue, 14 Jun 2022)
Log Message:
-----------
Rough-in implementation of CompoundBreak.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java
Added Paths:
-----------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/CompoundBreak4a.java
Added: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/CompoundBreak4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/CompoundBreak4a.java (rev 0)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/CompoundBreak4a.java 2022-06-14 22:02:44 UTC (rev 12654)
@@ -0,0 +1,225 @@
+/*
+ * Copyright 2022 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.orthography;
+
+import org.foray.common.kp.KpLeaf4a;
+import org.foray.common.kp.KpLeafIterator4a;
+import org.foray.common.primitive.StringUtils;
+
+import org.axsl.kp.KpBox;
+import org.axsl.kp.KpBranch;
+import org.axsl.kp.KpContext;
+import org.axsl.kp.KpLeaf;
+import org.axsl.kp.KpLeafIterator;
+import org.axsl.kp.KpNode;
+import org.axsl.kp.KpPenalty;
+import org.axsl.kp.KpUserAgent;
+import org.axsl.orthography.CompoundBreak;
+
+/**
+ * FOray implementation of {@link CompoundBreak}.
+ * Instances of this class are immutable.
+ */
+public final class CompoundBreak4a implements CompoundBreak, KpBranch {
+
+ /** Pre-built singleton instance. */
+ public static final CompoundBreak4a INSTANCE = new CompoundBreak4a();
+
+ /** The box portion of this compound break. */
+ private CompoundBreak4a.Box box;
+
+ /** The penalty portion of this compound break. */
+ private CompoundBreak4a.Penalty penalty;
+
+ /**
+ * Private constructor. This class is a singleton, and should be instantiated only within itself.
+ * Use {@link #getInstance()} to obtain the singleton instance of this class.
+ */
+ private CompoundBreak4a() {
+ this.box = new Box();
+ this.penalty = new Penalty();
+ }
+
+ /**
+ * Returns the singleton instance of this class.
+ * @return singleton instance of this class.
+ */
+ public static CompoundBreak4a getInstance() {
+ return CompoundBreak4a.INSTANCE;
+ }
+
+ @Override
+ public String toString() {
+ return "-";
+ }
+
+ @Override
+ public org.axsl.kp.KpNode.Type getKpNodeType() {
+ return KpNode.Type.BRANCH;
+ }
+
+ @Override
+ public int qtyKpNodes() {
+ return 2;
+ }
+
+ @Override
+ public int qtyKpLeaves() {
+ return 2;
+ }
+
+ @Override
+ public int qtyKpLeavesStrict() {
+ return 2;
+ }
+
+ @Override
+ public CharSequence getText() {
+ return "-";
+ }
+
+ @Override
+ public KpNode kpNodeAt(final int nodeIndex) {
+ switch (nodeIndex) {
+ case 0: return this.box;
+ case 1: return this.penalty;
+ default: throw new ArrayIndexOutOfBoundsException();
+ }
+ }
+
+ @Override
+ public KpLeaf kpLeafAt(final int leafIndex) {
+ switch (leafIndex) {
+ case 0: return this.box;
+ case 1: return this.penalty;
+ default: throw new ArrayIndexOutOfBoundsException();
+ }
+ }
+
+ @Override
+ public KpLeafIterator leafIterator() {
+ return new KpLeafIterator4a(this);
+ }
+
+ @Override
+ public KpContext getKpContext() {
+ return null;
+ }
+
+ /**
+ * The Box portion of the compound break.
+ */
+ public class Box extends KpLeaf4a implements KpBox {
+
+ @Override
+ public Type getKpLeafType() {
+ return KpLeaf.Type.BOX;
+ }
+
+ @Override
+ public int getIdealWidth(final KpContext config) {
+ return config.getHyphenCharacterWidth();
+ }
+
+ @Override
+ public int qtyKpLeavesStrict() {
+ return 1;
+ }
+
+ @Override
+ public CharSequence getText() {
+ return "-";
+ }
+
+ @Override
+ public int getStretchability(final KpContext config) {
+ return 0;
+ }
+
+ @Override
+ public int getShrinkability(final KpContext config) {
+ return 0;
+ }
+
+ }
+
+ /**
+ * The Penalty portion of the compound break.
+ */
+ public class Penalty extends KpLeaf4a implements KpPenalty {
+
+ @Override
+ public Type getKpLeafType() {
+ return KpLeaf.Type.PENALTY;
+ }
+
+ @Override
+ public int qtyKpLeavesStrict() {
+ return 1;
+ }
+
+ @Override
+ public CharSequence getText() {
+ return StringUtils.EMPTY_STRING;
+ }
+
+ @Override
+ public int getIdealWidth(final KpContext config) {
+ return 0;
+ }
+
+ @Override
+ public int getStretchability(final KpContext config) {
+ return 0;
+ }
+
+ @Override
+ public int getShrinkability(final KpContext config) {
+ return 0;
+ }
+
+ @Override
+ public int getPenaltyWidth(final KpContext config) {
+ return 0;
+ }
+
+ @Override
+ public int getCost(final KpUserAgent control) {
+ /* TODO: This is almost certainly wrong. This should probably be a separate cost entry in the context. */
+ return control.getCost(KpPenalty.Quality.ACCEPTABLE);
+ }
+
+ @Override
+ public boolean isFlagged() {
+ return false;
+ }
+
+ }
+
+}
Property changes on: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/CompoundBreak4a.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev
\ No newline at end of property
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2022-06-14 20:43:31 UTC (rev 12653)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/DictionaryParser.java 2022-06-14 22:02:44 UTC (rev 12654)
@@ -360,22 +360,25 @@
this.lastWord = actualContentLowercase;
}
- /* Look in the ambiguous words first. */
+ /* Is it an existing ambiguous word? */
if (this.ambiguousWordMap.containsKey(actualContent)) {
final List<StringWord> list = this.ambiguousWordMap.get(actualContent);
list.add(word);
- } else {
- /* See if this is a new ambiguous word. */
- if (wordMap.containsKey(actualContent)) {
- final StringWord existingMapEntry = wordMap.remove(actualContent);
- final List<StringWord> list = new ArrayList<StringWord>();
- list.add(existingMapEntry);
- list.add(word);
- this.ambiguousWordMap.put(actualContent, list);
- } else {
- wordMap.put(actualContent, word);
- }
+ break;
}
+
+ /* Is it a new ambiguous word? */
+ if (wordMap.containsKey(actualContent)) {
+ final StringWord existingMapEntry = wordMap.remove(actualContent);
+ final List<StringWord> list = new ArrayList<StringWord>();
+ list.add(existingMapEntry);
+ list.add(word);
+ this.ambiguousWordMap.put(actualContent, list);
+ break;
+ }
+
+ /* Add it to normal words. */
+ wordMap.put(actualContent, word);
break;
}
case "t": {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-14 20:43:34
|
Revision: 12653
http://sourceforge.net/p/foray/code/12653
Author: victormote
Date: 2022-06-14 20:43:31 +0000 (Tue, 14 Jun 2022)
Log Message:
-----------
Dictionary additions.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-14 18:49:00 UTC (rev 12652)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-14 20:43:31 UTC (rev 12653)
@@ -6682,7 +6682,7 @@
<w><t>An-so-ni-a</t></w>
<w><t>an-stoss</t></w>
<w><t>an-stös-se</t></w>
-<w><t>an-swer</t></w>
+<w><t>an-swer</t><noun><pluralizable/></noun><verb><regular-root/></verb></w>
<phrase><t>an-swer back</t></phrase>
<phrase><t>an-swer for</t></phrase>
<w><t>an-swer-a-bil-i-ty</t></w>
@@ -8588,7 +8588,7 @@
<w><t>ap-priz-er</t></w>
<w><t>ap-priz-ing</t></w>
<w><t>ap-pro</t></w>
-<w><t>ap-proach</t></w>
+<w><t>ap-proach</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>ap-proach-a-bil-i-ty</t></w>
<w><t>ap-proach-a-ble</t></w>
<w><t>ap-proach-a-ble-ness</t></w>
@@ -10101,7 +10101,7 @@
<w><t>as-i-nin-i-ty</t></w>
<w><t>A-sir</t></w>
<w><t>A-si-us</t></w>
-<w><t>ask</t></w>
+<w><t>ask</t><verb><regular-root/></verb></w>
<phrase><t>ask af-ter</t></phrase>
<w><t>a-skance</t></w>
<w><t>a-skant</t></w>
@@ -32193,7 +32193,7 @@
<w><t>con-sign-er</t></w>
<w><t>con-sign-ment</t></w>
<w><t>con-sign-or</t></w>
-<w><t>con-sist</t></w>
+<w><t>con-sist</t><verb><regular-root/></verb></w>
<w><t>con-sist-ence</t></w>
<w><t>con-sist-en-cy</t></w>
<w><t>con-sist-ent</t></w>
@@ -44474,10 +44474,10 @@
<w><t>do-nor-ship</t></w>
<w><t>don-sie</t></w>
<w><t>don-sy</t></w>
-<w><t>don’t</t></w>
<w><t>Do-nus</t></w>
<w><t>do-nut</t></w>
<w><t>don-zel</t></w>
+<w><t>don’t</t></w>
<w><t>doo-dad</t></w>
<w><t>doo-dah</t></w>
<w><t>doo-dle</t></w>
@@ -52561,7 +52561,7 @@
<w><t>ex-im-i-ous</t></w>
<w><t>ex-im-i-ous-ly</t></w>
<w><t>ex-ine</t></w>
-<w><t>ex-ist</t></w>
+<w><t>ex-ist</t><verb><regular-root/></verb></w>
<w><t>ex-ist-ence</t></w>
<w><t>ex-ist-ent</t></w>
<w><t>ex-is-ten-tial</t></w>
@@ -52935,7 +52935,7 @@
<w><t>ex-po-sé</t></w>
<w><t>ex-pound</t></w>
<w><t>ex-pound-er</t></w>
-<w><t>ex-press</t></w>
+<w><t>ex-press</t><verb><regular-root/></verb></w>
<phrase><t>ex-press ri-fle</t></phrase>
<w><t>ex-press-a-ble</t></w>
<w><t>ex-press-age</t></w>
@@ -53040,7 +53040,7 @@
<w><t>ex-tem-po-rized</t></w>
<w><t>ex-tem-po-riz-er</t></w>
<w><t>ex-tem-po-riz-ing</t></w>
-<w><t>ex-tend</t></w>
+<w><t>ex-tend</t><verb><regular-root/></verb></w>
<w><t>ex-tend-a-bil-i-ty</t></w>
<w><t>ex-tend-a-ble</t></w>
<w><t>ex-tend-ed</t></w>
@@ -53167,7 +53167,7 @@
<w><t>ex-tra-cel-lu-lar</t></w>
<w><t>ex-tra-cel-lu-lar-ly</t></w>
<w><t>ex-tra-cor-por-e-al</t></w>
-<w><t>ex-tract</t></w>
+<w><t>ex-tract</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>ex-tract-a-bil-i-ty</t></w>
<w><t>ex-tract-a-ble</t></w>
<w><t>ex-tract-ant</t></w>
@@ -54587,7 +54587,7 @@
<w><t>feed-stuff</t></w>
<w><t>feed-wa-ter</t></w>
<w><t>fee-ing</t></w>
-<w><t>feel</t></w>
+<w><t>feel</t><verb/></w>
<w><t>feel-er</t></w>
<phrase><t>feel-er gauge</t></phrase>
<w><t>fee-less</t></w>
@@ -54597,6 +54597,7 @@
<w><t>feel-ing-less-ly</t></w>
<w><t>feel-ing-ly</t></w>
<w><t>feel-ing-ness</t></w>
+<w><t>feels</t><verb/></w>
<w><t>feet</t></w>
<w><t>feet-first</t></w>
<w><t>feeze</t></w>
@@ -56755,7 +56756,7 @@
<w><t>flow-a-ble</t></w>
<w><t>flow-age</t></w>
<w><t>Flow-er</t></w>
-<w><t>flow-er</t></w>
+<w><t>flow-er</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>flow-er girl</t></phrase>
<phrase><t>flow-er head</t></phrase>
<phrase><t>flow-er pow-er</t></phrase>
@@ -60628,7 +60629,7 @@
<w><t>gate-way</t></w>
<w><t>Gath</t></w>
<w><t>Ga-tha</t></w>
-<w><t>gath-er</t></w>
+<w><t>gath-er</t><verb><regular-root/></verb></w>
<w><t>gath-er-a-ble</t></w>
<w><t>gath-er-er</t></w>
<w><t>gath-er-ing</t></w>
@@ -63751,7 +63752,7 @@
<phrase><t>grand-moth-er clock</t></phrase>
<w><t>grand-moth-er-li-ness</t></w>
<w><t>grand-moth-er-ly</t></w>
-<w><t>grand-neph-ew</t></w>
+<w><t>grand=neph-ew</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>grand-ness</t></w>
<w><t>grand-niece</t></w>
<w><t>grand-pa</t></w>
@@ -77459,7 +77460,7 @@
<w><t>in-struc-tor-less</t></w>
<w><t>in-struc-tor-ship</t></w>
<w><t>in-struc-tress</t></w>
-<w><t>in-stru-ment</t></w>
+<w><t>in-stru-ment</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<phrase><t>in-stru-ment fly-ing</t></phrase>
<phrase><t>in-stru-ment land-ing</t></phrase>
<phrase><t>in-stru-ment pan-el</t></phrase>
@@ -94103,7 +94104,7 @@
<w><t>men-tho-lat-ed</t></w>
<w><t>men-tho-la-ted</t></w>
<w><t>men-ti-cide</t></w>
-<w><t>men-tion</t></w>
+<w><t>men-tion</t><noun><pluralizable/></noun><verb><regular-root/></verb></w>
<w><t>men-tion-a-ble</t></w>
<w><t>men-tion-er</t></w>
<w><t>Men-ton</t></w>
@@ -94212,7 +94213,7 @@
<phrase><t>mer-cu-ry chlo-ride</t></phrase>
<phrase><t>mer-cu-ry=va-pour lamp</t></phrase>
<w><t>Mer-cy</t></w>
-<w><t>mer-cy</t></w>
+<w><t>mer-cy</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<phrase><t>mer-cy flight</t></phrase>
<phrase><t>mer-cy kill-ing</t></phrase>
<phrase><t>mer-cy seat</t></phrase>
@@ -99791,7 +99792,7 @@
<w><t>nam-by=pam-by</t></w>
<w><t>nam-by=pam-by-ish</t></w>
<w><t>nam-by=pam-by-ism</t></w>
-<w><t>name</t></w>
+<w><t>name</t><noun><pluralizable/></noun></w>
<w><t>name=call-er</t></w>
<w><t>name=call-ing</t></w>
<w><t>name=drop-per</t></w>
@@ -100809,7 +100810,7 @@
<w><t>neph-e-li-nit-ic</t></w>
<w><t>neph-e-lite</t></w>
<w><t>neph-e-lom-e-ter</t></w>
-<w><t>neph-ew</t></w>
+<w><t>neph-ew</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>Ne-phi</t></w>
<w><t>neph-o-gram</t></w>
<w><t>neph-o-graph</t></w>
@@ -108197,7 +108198,7 @@
<w><t>o-bit-u-ar-y</t></w>
<w><t>o-bi-tu-ar-y</t></w>
<w><t>obj</t></w>
-<w><t>ob-ject</t></w>
+<w><t>ob-ject</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>ob-ject ball</t></phrase>
<phrase><t>ob-ject glass</t></phrase>
<phrase><t>ob-ject lan-guage</t></phrase>
@@ -127363,7 +127364,7 @@
<w><t>pro-ce-dure</t></w>
<w><t>pro-ceed</t></w>
<w><t>pro-ceed-er</t></w>
-<w><t>pro-ceed-ing</t></w>
+<w><t>pro-ceed-ing</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>pro-ceeds</t></w>
<w><t>proc-e-leus-mat-ic</t></w>
<w><t>Pro-cel-la-rum</t></w>
@@ -132852,7 +132853,7 @@
<w><t>re-ac-tive</t></w>
<w><t>re-ac-tive-ly</t></w>
<w><t>re-ac-tor</t></w>
-<w><t>read</t></w>
+<w><t>read</t><verb/></w>
<w><t>Read</t></w>
<phrase><t>read in-to</t></phrase>
<w><t>read-a-bil-i-ty</t></w>
@@ -132899,6 +132900,7 @@
<w><t>re-a-dorn</t></w>
<w><t>re-a-dorn-ing</t></w>
<w><t>re-a-dorn-ment</t></w>
+<w><t>reads</t><verb/></w>
<w><t>re-ad-ver-tise</t></w>
<w><t>re-ad-ver-tised</t></w>
<w><t>re-ad-ver-tise-ment</t></w>
@@ -133584,7 +133586,7 @@
<w><t>rec-ol-lect-ed</t></w>
<w><t>rec-ol-lect-ed-ly</t></w>
<w><t>rec-ol-lect-ed-ness</t></w>
-<w><t>rec-ol-lec-tion</t></w>
+<w><t>rec-ol-lec-tion</t><noun><pluralizable/></noun></w>
<w><t>rec-ol-lec-tive</t></w>
<w><t>rec-ol-lec-tive-ly</t></w>
<w><t>rec-ol-lec-tive-ness</t></w>
@@ -135473,7 +135475,7 @@
<w><t>re-la-tion-less</t></w>
<w><t>re-la-tions</t></w>
<w><t>re-la-tion-ship</t></w>
-<w><t>rel-a-tive</t></w>
+<w><t>rel-a-tive</t><noun><pluralizable/><convertible-to-possessive/></noun><adjective/></w>
<phrase><t>rel-a-tive ap-er-ture</t></phrase>
<phrase><t>rel-a-tive a-tom-ic mass</t></phrase>
<phrase><t>rel-a-tive den-si-ty</t></phrase>
@@ -136288,7 +136290,7 @@
<w><t>re-plunge</t></w>
<w><t>re-plunged</t></w>
<w><t>re-plung-ing</t></w>
-<w><t>re-ply</t></w>
+<w><t>re-ply</t><noun><pluralizable/></noun><verb><regular-root/></verb></w>
<w><t>re-point</t></w>
<w><t>re-po-lar-i-za-tion</t></w>
<w><t>re-po-lar-ize</t></w>
@@ -137495,7 +137497,7 @@
<w><t>re-tuned</t></w>
<w><t>re-tun-ing</t></w>
<w><t>re-turf</t></w>
-<w><t>re-turn</t></w>
+<w><t>re-turn</t><noun><pluralizable/></noun><verb><regular-root/></verb></w>
<phrase><t>re-turn crease</t></phrase>
<phrase><t>re-turn tick-et</t></phrase>
<w><t>re-turn-a-ble</t></w>
@@ -145336,7 +145338,7 @@
<w><t>sen-tien-cy</t></w>
<w><t>sen-ti-ent</t></w>
<w><t>sen-tiently</t></w>
-<w><t>sen-ti-ment</t></w>
+<w><t>sen-ti-ment</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>sen-ti-ment-al</t></w>
<w><t>sen-ti-men-tal</t></w>
<phrase><t>sen-ti-ment-al val-ue</t></phrase>
@@ -147416,7 +147418,7 @@
<w><t>sig-moi-dal-ly</t></w>
<w><t>sig-moid-o-scope</t></w>
<w><t>Sig-mund</t></w>
-<w><t>sign</t></w>
+<w><t>sign</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>sign a-way</t></phrase>
<phrase><t>sign lan-guage</t></phrase>
<phrase><t>sign man-u-al</t></phrase>
@@ -148750,7 +148752,7 @@
<w><t>slink-ing</t></w>
<w><t>slink-ing-ly</t></w>
<w><t>slink-y</t></w>
-<w><t>slip</t></w>
+<w><t>slip</t><noun><pluralizable/></noun><verb><regular-root/></verb></w>
<w><t>slip=on</t></w>
<w><t>slip=up</t></w>
<w><t>slip-case</t></w>
@@ -157774,7 +157776,7 @@
<w><t>sup-pli-er</t></w>
<w><t>sup-ply</t></w>
<w><t>sup-ply-ing</t></w>
-<w><t>sup-port</t></w>
+<w><t>sup-port</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>sup-port-a-bil-i-ty</t></w>
<w><t>sup-port-a-ble</t></w>
<w><t>sup-port-a-ble-ness</t></w>
@@ -157996,7 +157998,7 @@
<w><t>sur-ro-gat-ing</t></w>
<w><t>sur-ro-ga-tion</t></w>
<w><t>sur-ro-git</t></w>
-<w><t>sur-round</t></w>
+<w><t>sur-round</t><verb><regular-root/></verb></w>
<w><t>sur-round-ed-ly</t></w>
<w><t>sur-round-er</t></w>
<w><t>sur-round-ing</t></w>
@@ -158722,7 +158724,7 @@
<w><t>sym-pa-thiz-ing-ly</t></w>
<w><t>sym-pa-tho-lyt-ic</t></w>
<w><t>sym-pa-tho-mi-met-ic</t></w>
-<w><t>sym-pa-thy</t></w>
+<w><t>sym-pa-thy</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<phrase><t>sym-pa-thy strike</t></phrase>
<w><t>sym-pat-ric</t></w>
<w><t>sym-pet-al-ous</t></w>
@@ -162161,6 +162163,8 @@
<phrase><t>thought dis-or-der</t></phrase>
<phrase><t>thought trans-fer-ence</t></phrase>
<w><t>thought-ful</t></w>
+<w><t>thought-ful-ly</t><adverb/></w>
+<w><t>thought-ful-ness</t><noun/></w>
<w><t>thought-less</t></w>
<w><t>thought-less-ly</t></w>
<w><t>thought-less-ness</t></w>
@@ -164851,7 +164855,7 @@
<w><t>trel-lis-work</t></w>
<w><t>Trem-a-to-da</t></w>
<w><t>trem-a-tode</t></w>
-<w><t>trem-ble</t></w>
+<w><t>trem-ble</t><verb><regular-root/></verb></w>
<w><t>trem-bler</t></w>
<w><t>trem-bles</t></w>
<w><t>trem-bli-er</t></w>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-14 18:49:03
|
Revision: 12652
http://sourceforge.net/p/foray/code/12652
Author: victormote
Date: 2022-06-14 18:49:00 +0000 (Tue, 14 Jun 2022)
Log Message:
-----------
Handle text-surrogate elements.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java
trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java 2022-06-13 21:47:14 UTC (rev 12651)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/Lexer4a.java 2022-06-14 18:49:00 UTC (rev 12652)
@@ -34,6 +34,7 @@
import org.foray.common.primitive.StringUtils;
import org.axsl.orthography.optional.Lexer;
+import org.axsl.unicode.block.Latin_1_Supplement_Block;
import org.axsl.utility.sequence.IntSequence;
import java.util.ArrayList;
@@ -339,10 +340,15 @@
case Character.OTHER_SYMBOL: {
return true;
}
- default: {
- return false;
}
+
+ switch (c) {
+ case Latin_1_Supplement_Block.NO_BREAK_SPACE: {
+ return true;
}
+ }
+
+ return false;
}
/**
Modified: trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java
===================================================================
--- trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-06-13 21:47:14 UTC (rev 12651)
+++ trunk/foray/foray-orthography/src/main/java/org/foray/orthography/util/SpellChecker.java 2022-06-14 18:49:00 UTC (rev 12652)
@@ -41,6 +41,7 @@
import org.foray.xml.SaxParser;
import org.axsl.i18n.WritingSystem;
+import org.axsl.orthography.Orthography;
import org.axsl.orthography.OrthographyException;
import org.axsl.orthography.optional.Dictionary;
@@ -67,7 +68,9 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Stack;
import javax.xml.parsers.ParserConfigurationException;
@@ -76,6 +79,8 @@
* Parses a generic XML document, looking for spelling errors.
* The specified natural language can change at any time, and must be tracked.
* General plan is to capture all of the text data in one CharSequence, then parse and compare to dictionary entries.
+ * TODO: The element-specific configuration items in this class (e.g. {@link #elementIgnoreList} and
+ * {@link #textElementMap} should be externalized so that they are configurable.
*/
public class SpellChecker extends SaxParser<Object> {
@@ -149,6 +154,13 @@
/** The list of elements having no content but that can be placed in the middle of a word. */
private List<String> elementIgnoreList = Arrays.asList(new String[] {"Page", "MendOut", "Comment", "ToDo"});
+ /** Map whose key is elements that are actually tokens for text, and whose value is that text. */
+ private Map<String, String> textElementMap = new HashMap<String, String>();
+ {
+ textElementMap.put("Nbsp", "\u00A0");
+ textElementMap.put("Zwsp", "\u200B");
+ }
+
/** The list of dictionaries that are currently active, i.e. that match the current orthography. */
private List<Dictionary> currentDictionaries = new ArrayList<Dictionary>();
@@ -224,6 +236,13 @@
return;
}
+ /* Elements that are surrogates for text are converted to that text here. */
+ if (this.textElementMap.containsKey(localName)) {
+ final String textElementValue = this.textElementMap.get(localName);
+ appendText(textElementValue);
+ return;
+ }
+
final Element element = new Element();
element.namespace = uri;
element.localName = localName;
@@ -300,6 +319,11 @@
return;
}
+ /* Elements that are surrogates for text were handled in startElement, and should be ignored here. */
+ if (this.textElementMap.containsKey(localName)) {
+ return;
+ }
+
final Element element = this.elementStack.peek();
List<CharSequence> words = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2022-06-13 21:47:17
|
Revision: 12651
http://sourceforge.net/p/foray/code/12651
Author: victormote
Date: 2022-06-13 21:47:14 +0000 (Mon, 13 Jun 2022)
Log Message:
-----------
Dictionary additions.
Modified Paths:
--------------
trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
Modified: trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml
===================================================================
--- trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-13 18:16:11 UTC (rev 12650)
+++ trunk/foray/foray-orthography/src/main/data/dictionaries/eng-Latn-999.dict.xml 2022-06-13 21:47:14 UTC (rev 12651)
@@ -1302,7 +1302,7 @@
<w><t>Ack-er-ley</t></w>
<w><t>ack-ey</t></w>
<w><t>Ack-ley</t></w>
-<w><t>ac-knowl-edge</t></w>
+<w><t>ac-knowl-edge</t><verb><regular-root/></verb></w>
<w><t>ac-knowl-edge-a-ble</t></w>
<w><t>ac-knowl-edged</t></w>
<w><t>ac-knowl-edged-ly</t></w>
@@ -2660,7 +2660,7 @@
<w><t>af-flu-ent</t></w>
<w><t>af-flu-ent-ly</t></w>
<w><t>af-flux</t></w>
-<w><t>af-ford</t></w>
+<w><t>af-ford</t><verb><regular-root/></verb></w>
<w><t>af-ford-a-ble</t></w>
<w><t>af-for-est</t></w>
<w><t>af-for-est-a-tion</t></w>
@@ -3218,7 +3218,7 @@
<w><t>a-i</t></w>
<w><t>A-ias</t></w>
<w><t>ai-blins</t></w>
-<w><t>aid</t></w>
+<w><t>aid</t><noun><pluralizable/></noun><verb><regular-root/></verb></w>
<w><t>Ai-dan</t></w>
<w><t>aide</t></w>
<w><t>aide=m-moire</t></w>
@@ -3530,9 +3530,10 @@
<w><t>a-lar</t></w>
<w><t>A-lar-cón</t></w>
<w><t>Al-a-ric</t></w>
-<w><t>a-larm</t></w>
+<w><t>a-larm</t><noun><pluralizable/><convertible-to-possessive/></noun><verb></verb></w>
<phrase><t>a-larm clock</t></phrase>
<w><t>a-larm-a-ble</t></w>
+<w><t>a-larm-ed</t><adjective/></w>
<w><t>a-larm-ed-ly</t></w>
<w><t>a-larm-ing-ly</t></w>
<w><t>a-larm-ism</t></w>
@@ -30558,7 +30559,7 @@
<w><t>com-mence-ment</t></w>
<w><t>com-menc-er</t></w>
<w><t>com-menc-ing</t></w>
-<w><t>com-mend</t></w>
+<w><t>com-mend</t><verb><regular-root/></verb></w>
<w><t>com-mend-a-ble</t></w>
<w><t>com-mend-a-ble-ness</t></w>
<w><t>com-mend-a-bly</t></w>
@@ -37837,7 +37838,7 @@
<w><t>dau-er-schlaf</t></w>
<w><t>Dau-ga-va</t></w>
<w><t>Dau-gav-pils</t></w>
-<w><t>daugh-ter</t></w>
+<w><t>daugh-ter</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>daugh-ter=in=law</t></w>
<w><t>daugh-ter-less</t></w>
<w><t>daugh-ter-like</t></w>
@@ -39351,7 +39352,7 @@
<w><t>del-i-tes-cent</t></w>
<w><t>De-li-um</t></w>
<w><t>De-li-us</t></w>
-<w><t>de-liv-er</t></w>
+<w><t>de-liv-er</t><verb><regular-root/></verb></w>
<w><t>de-liv-er-a-ble</t></w>
<w><t>de-liv-er-ance</t></w>
<w><t>de-liv-er-er</t></w>
@@ -44473,6 +44474,7 @@
<w><t>do-nor-ship</t></w>
<w><t>don-sie</t></w>
<w><t>don-sy</t></w>
+<w><t>don’t</t></w>
<w><t>Do-nus</t></w>
<w><t>do-nut</t></w>
<w><t>don-zel</t></w>
@@ -45240,7 +45242,7 @@
<w><t>Dra-vid-ic</t></w>
<w><t>dra-vite</t></w>
<w><t>Dra-vos-burg</t></w>
-<w><t>draw</t></w>
+<w><t>draw</t><noun/><verb/></w>
<w><t>draw-a-bil-i-ty</t></w>
<w><t>draw-a-ble</t></w>
<w><t>draw-back</t></w>
@@ -45271,6 +45273,7 @@
<w><t>drawn</t></w>
<phrase><t>drawn but-ter</t></phrase>
<w><t>draw-plate</t></w>
+<w><t>draws</t><verb/></w>
<w><t>draw-shave</t></w>
<w><t>draw-string</t></w>
<w><t>draw-tube</t></w>
@@ -45288,7 +45291,7 @@
<w><t>dread-naught</t></w>
<w><t>dread-ness</t></w>
<w><t>dread-nought</t></w>
-<w><t>dream</t></w>
+<w><t>dream</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>dream-boat</t></w>
<w><t>dream-er</t></w>
<w><t>dream-ful</t></w>
@@ -49623,7 +49626,7 @@
<w><t>en-tel-lus-es</t></w>
<w><t>en-tente</t></w>
<phrase><t>en-tente cor-diale</t></phrase>
-<w><t>en-ter</t></w>
+<w><t>en-ter</t><verb><regular-root/></verb></w>
<phrase><t>en-ter in-to</t></phrase>
<w><t>en-ter-a</t></w>
<w><t>en-ter-a-ble</t></w>
@@ -52096,6 +52099,7 @@
<phrase><t>ex post fac-to</t></phrase>
<phrase><t>ex si-len-ti-o</t></phrase>
<phrase><t>ex vo-to</t></phrase>
+<w><t>ex=Chan-cel-lor</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>ex=di-rec-to-ry</t></w>
<w><t>ex=of-fi-ci-o</t></w>
<w><t>ex=pres-i-dent</t></w>
@@ -52705,7 +52709,7 @@
<w><t>ex-pa-tri-at-ed</t></w>
<w><t>ex-pa-tri-at-ing</t></w>
<w><t>ex-pa-tri-a-tion</t></w>
-<w><t>ex-pect</t></w>
+<w><t>ex-pect</t><verb><regular-root/></verb></w>
<w><t>ex-pect-a-ble</t></w>
<w><t>ex-pect-a-bly</t></w>
<w><t>ex-pect-ance</t></w>
@@ -53617,7 +53621,7 @@
<phrase><t>Fahr-en-heit scale</t></phrase>
<w><t>Fai-al</t></w>
<w><t>fa-ience</t></w>
-<w><t>fail</t></w>
+<w><t>fail</t><verb><regular-root/></verb></w>
<w><t>fail-ing</t></w>
<w><t>fail-ing-ly</t></w>
<w><t>fail-ing-ness</t></w>
@@ -54415,7 +54419,7 @@
<w><t>feal</t></w>
<w><t>Fea-la</t></w>
<w><t>fe-al-ty</t></w>
-<w><t>fear</t></w>
+<w><t>fear</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>Fear</t></w>
<w><t>fear-ful</t></w>
<w><t>fear-ful-ly</t></w>
@@ -57182,7 +57186,7 @@
<w><t>fol-lic-u-lin</t></w>
<w><t>fol-lic-u-li-tis</t></w>
<w><t>fol-lis</t></w>
-<w><t>fol-low</t></w>
+<w><t>fol-low</t><verb><regular-root/></verb></w>
<phrase><t>fol-low out</t></phrase>
<phrase><t>fol-low through</t></phrase>
<phrase><t>fol-low up</t></phrase>
@@ -59656,6 +59660,7 @@
<w><t>G=man</t></w>
<w><t>G=stro-phan-thin</t></w>
<w><t>G=suit</t></w>
+<w><t>Ga</t><abbrev referenced-word="Georgia"/></w>
<w><t>gab</t></w>
<w><t>Ga-b</t></w>
<w><t>Gab-a-on</t></w>
@@ -61180,6 +61185,7 @@
<w><t>gen-tle-man-li-ness</t></w>
<w><t>gen-tle-man-ly</t></w>
<phrase><t>gen-tle-men's a-gree-ment</t></phrase>
+<w><t>gen-tle-men</t><noun><plural/></noun></w>
<w><t>gen-tle-men=at=arms</t></w>
<w><t>gen-tle-men=com-mon-ers</t></w>
<w><t>gen-tle-men=farm-ers</t></w>
@@ -63807,7 +63813,7 @@
<w><t>gran-o-phyre</t></w>
<w><t>gran-o-phy-ric</t></w>
<w><t>Grant</t></w>
-<w><t>grant</t></w>
+<w><t>grant</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>grant of pro-bate</t></phrase>
<phrase><t>Grant Sa-hib</t></phrase>
<w><t>Gran-ta</t></w>
@@ -64291,9 +64297,9 @@
<w><t>green-wood</t></w>
<w><t>Green-wood</t></w>
<w><t>Greer</t></w>
-<w><t>greet</t></w>
+<w><t>greet</t><verb><regular-root/></verb></w>
<w><t>greet-er</t></w>
-<w><t>greet-ing</t></w>
+<w><t>greet-ing</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>greet-ing-less</t></w>
<w><t>greet-ing-ly</t></w>
<w><t>Greg</t></w>
@@ -70462,7 +70468,7 @@
<w><t>ho-mal-o-graph-ic</t></w>
<w><t>hom-bre</t></w>
<w><t>hom-burg</t></w>
-<w><t>home</t></w>
+<w><t>home</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>Home</t></w>
<phrase><t>Home Coun-ties</t></phrase>
<phrase><t>home e-co-nom-ics</t></phrase>
@@ -70924,7 +70930,7 @@
<phrase><t>hop in-to</t></phrase>
<w><t>hop=pick-er</t></w>
<w><t>Ho-pat-cong</t></w>
-<w><t>hope</t></w>
+<w><t>hope</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>Hope</t></w>
<w><t>Hope-dale</t></w>
<w><t>hope-ful</t></w>
@@ -71720,7 +71726,7 @@
<w><t>hu-mid-ly</t></w>
<w><t>hu-mid-ness</t></w>
<w><t>hu-mi-dor</t></w>
-<w><t>hu-mil-i-ate</t></w>
+<w><t>hu-mil-i-ate</t><verb><regular-root/></verb></w>
<w><t>hu-mil-i-at-ed</t></w>
<w><t>hu-mil-i-at-ing</t></w>
<w><t>hu-mil-i-at-ing-ly</t></w>
@@ -76514,7 +76520,7 @@
<w><t>in-firm</t></w>
<w><t>in-fir-mar-i-an</t></w>
<w><t>in-fir-ma-ry</t></w>
-<w><t>in-fir-mi-ty</t></w>
+<w><t>in-fir-mi-ty</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>in-firm-ly</t></w>
<w><t>in-firm-ness</t></w>
<w><t>in-fix</t></w>
@@ -83620,10 +83626,11 @@
<w><t>kins-folk</t></w>
<w><t>Kin-sha-sa</t></w>
<w><t>kin-ship</t></w>
-<w><t>kins-man</t></w>
+<w><t>kins-man</t><noun/></w>
+<w><t>kins-men</t><noun><plural/></noun></w>
<w><t>Kin-ston</t></w>
-<w><t>kins-wom-an</t></w>
-<w><t>kins-wom-en</t></w>
+<w><t>kins-wom-an</t><noun/></w>
+<w><t>kins-wom-en</t><noun><plural/></noun></w>
<w><t>Kio-ga</t></w>
<w><t>ki-o-nec-to-my</t></w>
<w><t>ki-o-not-o-my</t></w>
@@ -93924,7 +93931,7 @@
<w><t>mem-o-rized</t></w>
<w><t>mem-o-riz-er</t></w>
<w><t>mem-o-riz-ing</t></w>
-<w><t>mem-o-ry</t></w>
+<w><t>mem-o-ry</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<phrase><t>mem-o-ry bank</t></phrase>
<phrase><t>mem-o-ry span</t></phrase>
<phrase><t>mem-o-ry trace</t></phrase>
@@ -100322,7 +100329,7 @@
<w><t>Ne-a-pol-i-tan</t></w>
<phrase><t>Ne-a-pol-i-tan ice cream</t></phrase>
<phrase><t>Ne-a-pol-i-tan sixth</t></phrase>
-<w><t>near</t></w>
+<w><t>near</t><adjective><extensible/></adjective></w>
<w><t>near=sight-ed</t></w>
<w><t>near-by</t></w>
<w><t>Nearch</t></w>
@@ -119345,7 +119352,7 @@
<w><t>phys-i-cal-ism</t></w>
<w><t>phys-i-cal-i-ty</t></w>
<w><t>phys-i-cal-ly</t></w>
-<w><t>phy-si-cian</t></w>
+<w><t>phy-si-cian</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>phy-si-cian-ly</t></w>
<w><t>phy-si-cian-ship</t></w>
<w><t>phys-i-cist</t></w>
@@ -120712,7 +120719,7 @@
<w><t>plau-si-ble</t></w>
<w><t>plau-sive</t></w>
<w><t>Plau-tus</t></w>
-<w><t>play</t></w>
+<w><t>play</t><verb><regular-root/></verb></w>
<phrase><t>play a-long</t></phrase>
<w><t>pla-ya</t></w>
<w><t>play-a-ble</t></w>
@@ -123840,6 +123847,7 @@
<phrase><t>pre-cious met-al</t></phrase>
<phrase><t>pre-cious stone</t></phrase>
<w><t>pre-cious-ly</t></w>
+<w><t>pre-cious-ness</t><noun/></w>
<w><t>prec-i-pice</t></w>
<w><t>prec-i-piced</t></w>
<w><t>pre-cip-i-tance</t></w>
@@ -126677,8 +126685,9 @@
<w><t>pre-vi-o-lat-ed</t></w>
<w><t>pre-vi-o-lat-ing</t></w>
<w><t>pre-vi-o-la-tion</t></w>
-<w><t>pre-vi-ous</t></w>
+<w><t>pre-vi-ous</t><adjective/></w>
<phrase><t>pre-vi-ous ques-tion</t></phrase>
+<w><t>pre-vi-ous-ly</t><adverb/></w>
<w><t>pre-vise</t></w>
<w><t>pre-vised</t></w>
<w><t>pre-vis-i-bil-i-ty</t></w>
@@ -131409,7 +131418,7 @@
<w><t>quick=set-ting</t></w>
<w><t>quick=tem-pered</t></w>
<w><t>quick=wit-ted</t></w>
-<w><t>quick-en</t></w>
+<w><t>quick-en</t><verb><regular-root/></verb></w>
<w><t>quick-er</t></w>
<w><t>quick-hatch</t></w>
<w><t>quick-ie</t></w>
@@ -134783,7 +134792,7 @@
<w><t>re-fut-ing</t></w>
<w><t>Reg</t></w>
<w><t>reg</t></w>
-<w><t>re-gain</t></w>
+<w><t>re-gain</t><verb><regular-root/></verb></w>
<w><t>Re-gain</t></w>
<w><t>re-gain-a-ble</t></w>
<w><t>re-gain-er</t></w>
@@ -136542,7 +136551,7 @@
<w><t>re-qual-i-fied</t></w>
<w><t>re-qual-i-fy</t></w>
<w><t>re-qual-i-fy-ing</t></w>
-<w><t>re-quest</t></w>
+<w><t>re-quest</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>re-quest stop</t></phrase>
<w><t>re-ques-tion</t></w>
<w><t>re-quick-en</t></w>
@@ -139249,7 +139258,7 @@
<w><t>ros-coe-lite</t></w>
<w><t>Ros-com-mon</t></w>
<w><t>Rose</t></w>
-<w><t>rose</t></w>
+<w><t>rose</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<phrase><t>rose a-ca-cia</t></phrase>
<phrase><t>rose ap-ple</t></phrase>
<phrase><t>rose cam-pi-on</t></phrase>
@@ -150725,7 +150734,7 @@
<w><t>spar</t></w>
<w><t>Spar</t></w>
<w><t>spar-a-ble</t></w>
-<w><t>spare</t></w>
+<w><t>spare</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb><adjective></adjective></w>
<w><t>spare-a-ble</t></w>
<w><t>spare-ly</t></w>
<w><t>spare-ness</t></w>
@@ -153019,7 +153028,7 @@
<w><t>Sten-tor</t></w>
<w><t>sten-to-ri-an</t></w>
<w><t>sten-to-ri-ous-ly</t></w>
-<w><t>step</t></w>
+<w><t>step</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>step=and=re-peat</t></w>
<w><t>step=in</t></w>
<w><t>step=on</t></w>
@@ -158749,7 +158758,7 @@
<w><t>sym-po-si-arch</t></w>
<w><t>sym-po-si-um</t></w>
<w><t>sym-po-si-ums</t></w>
-<w><t>symp-tom</t></w>
+<w><t>symp-tom</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>symp-to-mat-ic</t></w>
<w><t>symp-to-mat-i-cal</t></w>
<w><t>symp-to-mat-i-cal-ly</t></w>
@@ -177491,6 +177500,7 @@
<w><t>un-stay-ing</t></w>
<w><t>un-stead-fast</t></w>
<w><t>un-stead-ied</t></w>
+<w><t>un-stead-i-ness</t><noun/></w>
<w><t>un-stead-y</t></w>
<w><t>un-stead-y-ing</t></w>
<w><t>un-stealth-i-ly</t></w>
@@ -179518,7 +179528,7 @@
<w><t>V=eight</t></w>
<w><t>V=sign</t></w>
<phrase><t>V=type en-gine</t></phrase>
-<phrase><t>Va # Abbreviation for Virginia</t></phrase>
+<w><t>Va</t><abbrev referenced-word="Virginia"/></w>
<w><t>va-ad</t></w>
<w><t>va-a-dim</t></w>
<w><t>Vaal</t></w>
@@ -181265,7 +181275,7 @@
<w><t>vi-o-lent</t></w>
<w><t>vi-o-les-cent</t></w>
<w><t>Vi-o-let</t></w>
-<w><t>vi-o-let</t></w>
+<w><t>vi-o-let</t><noun><pluralizable/><convertible-to-possessive/></noun></w>
<w><t>vi-o-let-like</t></w>
<w><t>Vi-o-let-ta</t></w>
<w><t>Vi-o-lette</t></w>
@@ -181444,7 +181454,7 @@
<w><t>vi-sion-less</t></w>
<w><t>vis-ised</t></w>
<w><t>vis-is-ing</t></w>
-<w><t>vis-it</t></w>
+<w><t>vis-it</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<w><t>vis-i-tant</t></w>
<w><t>vis-it-a-tion</t></w>
<w><t>Vis-it-a-tion</t></w>
@@ -182289,7 +182299,7 @@
<w><t>Wal-hal-la</t></w>
<w><t>wal-ies</t></w>
<w><t>wal-ing</t></w>
-<w><t>walk</t></w>
+<w><t>walk</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>walk a-way</t></phrase>
<phrase><t>walk in-to</t></phrase>
<w><t>walk=in</t></w>
@@ -182706,7 +182716,7 @@
<w><t>wast-ry</t></w>
<w><t>wat</t></w>
<w><t>wa-tap</t></w>
-<w><t>watch</t></w>
+<w><t>watch</t><noun><pluralizable/><convertible-to-possessive/></noun><verb><regular-root/></verb></w>
<phrase><t>Watch Com-mit-tee</t></phrase>
<w><t>watch-band</t></w>
<w><t>watch-case</t></w>
@@ -184690,7 +184700,7 @@
<w><t>wie-ner-wurst</t></w>
<w><t>wie-nie</t></w>
<w><t>Wies-ba-den</t></w>
-<w><t>wife</t></w>
+<w><t>wife</t><noun><convertible-to-possessive/></noun></w>
<phrase><t>wife swap-ping</t></phrase>
<w><t>wife-dom</t></w>
<w><t>wife-hood</t></w>
@@ -185778,7 +185788,7 @@
<w><t>worth-less-ly</t></w>
<w><t>worth-less-ness</t></w>
<w><t>worth-while</t></w>
-<w><t>wor-thy</t></w>
+<w><t>wor-thy</t><noun><pluralizable/><convertible-to-possessive/></noun><adjective><extensible/></adjective></w>
<w><t>wot</t></w>
<w><t>Wo-tan</t></w>
<w><t>Wot-ton</t></w>
@@ -185894,8 +185904,9 @@
<w><t>wrist-watch</t></w>
<w><t>writ</t></w>
<phrase><t>writ of ex-e-cu-tion</t></phrase>
-<w><t>write</t></w>
+<w><t>write</t><verb/></w>
<w><t>writ-er</t></w>
+<w><t>writes</t><verb/></w>
<phrase><t>writ-er's cramp</t></phrase>
<w><t>writhe</t></w>
<w><t>writh-en</t></w>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|