You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by co...@apache.org on 2011/09/01 23:07:05 UTC
svn commit: r1164273 -
/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java
Author: colen
Date: Thu Sep 1 21:07:05 2011
New Revision: 1164273
URL: http://svn.apache.org/viewvc?rev=1164273&view=rev
Log:
OPENNLP-293 Marked the constructor that takes the xml file and a case sensitivity flag as deprecated.
Modified:
incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java
Modified: incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java?rev=1164273&r1=1164272&r2=1164273&view=diff
==============================================================================
--- incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java (original)
+++ incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java Thu Sep 1 21:07:05 2011
@@ -113,16 +113,30 @@ public class Dictionary implements Itera
* @throws InvalidFormatException
*/
public Dictionary(InputStream in) throws IOException, InvalidFormatException {
- this(in,false);
+ isCaseSensitive = DictionarySerializer.create(in, new EntryInserter() {
+ public void insert(Entry entry) {
+ put(entry.getTokens());
+ }
+ });
}
+ /**
+ * Loads a Dictionary from a XML file.
+ *
+ * @deprecated This constructor is deprecated. Passing the case sensitivity
+ * flag has no effect. Use
+ * {@link Dictionary#Dictionary(InputStream)} instead and set the
+ * case sensitivity during the dictionary creation.
+ *
+ * @param in
+ * the dictionary in its XML format
+ * @param caseSensitive
+ * has no effect
+ * @throws IOException
+ * @throws InvalidFormatException
+ */
public Dictionary(InputStream in, boolean caseSensitive) throws IOException, InvalidFormatException {
- isCaseSensitive = DictionarySerializer.create(in, new EntryInserter()
- {
- public void insert(Entry entry) {
- put(entry.getTokens());
- }
- });
+ this(in);
}
/**