[FOray-commit] SF.net SVN: foray:[11964] trunk/foray/foray-hyphen/src
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2021-10-30 16:59:58
|
Revision: 11964
http://sourceforge.net/p/foray/code/11964
Author: victormote
Date: 2021-10-30 16:59:56 +0000 (Sat, 30 Oct 2021)
Log Message:
-----------
Use new aXSL interfaces for Dictionary and WordFactory.
Modified Paths:
--------------
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/OrthographyConfig.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SegmentDictionary.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SpellChecker.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/WordWrapperFactory.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPast1WordFactory.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural1WordFactory.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural2WordFactory.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactory.java
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactory.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPast1WordFactoryTests.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural1WordFactoryTests.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural2WordFactoryTests.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactoryTests.java
trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactoryTests.java
Removed Paths:
-------------
trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/Dictionary.java
Deleted: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/Dictionary.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/Dictionary.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/Dictionary.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -1,47 +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.hyphen;
-
-import org.axsl.hyphen.Word;
-
-import java.io.Serializable;
-
-/**
- * A collection of natural-language words, possibly useful for hyphenation, spell-checking, etc.
- */
-public interface Dictionary extends Serializable {
-
- /**
- * Retrieves a word from this dictionary.
- * @param wordString The String whose word should be retrieved.
- * @return The word matching {@code wordString}, or null if none is found.
- */
- Word getWord(CharSequence wordString);
-
-}
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/OrthographyConfig.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/OrthographyConfig.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/OrthographyConfig.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,6 +28,8 @@
package org.foray.hyphen;
+import org.axsl.hyphen.Dictionary;
+
import java.util.ArrayList;
import java.util.List;
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SegmentDictionary.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SegmentDictionary.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SegmentDictionary.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -30,6 +30,8 @@
import org.foray.common.data.TernaryTreeMap;
+import org.axsl.hyphen.Dictionary;
+
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SpellChecker.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SpellChecker.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/SpellChecker.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -36,6 +36,7 @@
import org.foray.common.primitive.XmlUtils;
import org.axsl.common.i18n.Orthography;
+import org.axsl.hyphen.Dictionary;
import org.axsl.hyphen.HyphenationException;
import org.axsl.hyphen.Word;
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/WordWrapperFactory.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/WordWrapperFactory.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/WordWrapperFactory.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,11 +28,14 @@
package org.foray.hyphen;
+import org.axsl.hyphen.Dictionary;
+import org.axsl.hyphen.WordFactory;
+
/**
* Factory that knows how to create an instance of a {@link WordWrapper}.
* @param <T> The type of {@link WordWrapper} created by this factory.
*/
-public abstract class WordWrapperFactory<T extends WordWrapper> {
+public abstract class WordWrapperFactory<T extends WordWrapper> implements WordFactory<T> {
/**
* Checks a word against the pattern for this word wrapper, and creates an instance of it if there is a match.
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPast1WordFactory.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPast1WordFactory.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPast1WordFactory.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -29,9 +29,9 @@
package org.foray.hyphen.wrapper;
import org.foray.common.primitive.CharSequenceUtils;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.WordWrapperFactory;
+import org.axsl.hyphen.Dictionary;
import org.axsl.hyphen.Word;
/**
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural1WordFactory.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural1WordFactory.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural1WordFactory.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -29,9 +29,9 @@
package org.foray.hyphen.wrapper;
import org.foray.common.primitive.CharSequenceUtils;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.WordWrapperFactory;
+import org.axsl.hyphen.Dictionary;
import org.axsl.hyphen.Word;
/**
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural2WordFactory.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural2WordFactory.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPlural2WordFactory.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -29,9 +29,9 @@
package org.foray.hyphen.wrapper;
import org.foray.common.primitive.CharSequenceUtils;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.WordWrapperFactory;
+import org.axsl.hyphen.Dictionary;
import org.axsl.hyphen.Word;
/**
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactory.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactory.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactory.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -29,9 +29,9 @@
package org.foray.hyphen.wrapper;
import org.foray.common.primitive.CharSequenceUtils;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.WordWrapperFactory;
+import org.axsl.hyphen.Dictionary;
import org.axsl.hyphen.Word;
/**
Modified: trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactory.java
===================================================================
--- trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactory.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/main/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactory.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -29,9 +29,9 @@
package org.foray.hyphen.wrapper;
import org.foray.common.primitive.CharSequenceUtils;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.WordWrapperFactory;
+import org.axsl.hyphen.Dictionary;
import org.axsl.hyphen.Word;
/**
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPast1WordFactoryTests.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPast1WordFactoryTests.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPast1WordFactoryTests.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,9 +28,10 @@
package org.foray.hyphen.wrapper;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.StringWordTests;
+import org.axsl.hyphen.Dictionary;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural1WordFactoryTests.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural1WordFactoryTests.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural1WordFactoryTests.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,9 +28,10 @@
package org.foray.hyphen.wrapper;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.StringWordTests;
+import org.axsl.hyphen.Dictionary;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural2WordFactoryTests.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural2WordFactoryTests.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPlural2WordFactoryTests.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,9 +28,10 @@
package org.foray.hyphen.wrapper;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.StringWordTests;
+import org.axsl.hyphen.Dictionary;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactoryTests.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactoryTests.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive1WordFactoryTests.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,9 +28,10 @@
package org.foray.hyphen.wrapper;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.StringWordTests;
+import org.axsl.hyphen.Dictionary;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
Modified: trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactoryTests.java
===================================================================
--- trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactoryTests.java 2021-10-30 15:36:57 UTC (rev 11963)
+++ trunk/foray/foray-hyphen/src/test/java/org/foray/hyphen/wrapper/LatinPossessive2WordFactoryTests.java 2021-10-30 16:59:56 UTC (rev 11964)
@@ -28,9 +28,10 @@
package org.foray.hyphen.wrapper;
-import org.foray.hyphen.Dictionary;
import org.foray.hyphen.StringWordTests;
+import org.axsl.hyphen.Dictionary;
+
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|