You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by mb...@apache.org on 2008/06/23 14:31:42 UTC
svn commit: r670541 [4/4] - in /incubator/uima/sandbox/trunk/ConceptMapper:
./ desc/ desc/analysis_engine/ desc/analysis_engine/aggregate/
desc/analysis_engine/primitive/ desc/collection_processing_engines/ doc/
resources/ resources/dict/ src/ src/main...
Added: incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenFilter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenFilter.java?rev=670541&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenFilter.java (added)
+++ incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenFilter.java Mon Jun 23 05:31:40 2008
@@ -0,0 +1,381 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.apache.uima.conceptMapper.support.tokens;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException;
+import org.apache.uima.analysis_engine.annotator.AnnotatorContext;
+import org.apache.uima.analysis_engine.annotator.AnnotatorContextException;
+import org.apache.uima.cas.Feature;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.TypeSystem;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.conceptMapper.Logger;
+import org.apache.uima.conceptMapper.support.dictionaryResource.DictionaryToken;
+
+public class TokenFilter {
+
+ private String tokenClassFeatureName;
+
+ private Feature tokenClassFeature = null;
+
+ private String tokenTypeFeatureName;
+
+ private Feature tokenTypeFeature = null;
+
+ private Logger logger;
+
+ /** Configuration parameter for list of token classes to include in lookups */
+ public static final String PARAM_INCLUDEDTOKENCLASSES = "IncludedTokenClasses";
+
+ // J5.0 protected Hashtable<String, Boolean> includedTokenClasses;
+ protected HashSet<String> includedTokenClasses;
+
+ /** Configuration parameter for list of token classes to include in lookups */
+ public static final String PARAM_EXCLUDEDTOKENCLASSES = "ExcludedTokenClasses";
+
+ // J5.0 protected Hashtable<String, Boolean> excludedTokenClasses;
+ protected HashSet<String> excludedTokenClasses;
+
+ /** Configuration parameter for list of token classes to include in lookups */
+ public static final String PARAM_INCLUDEDTOKENTYPES = "IncludedTokenTypes";
+
+ // J5.0 protected Hashtable<Integer, Boolean> includedTokenTypes;
+ protected HashSet<Integer> includedTokenTypes;
+
+ /** Configuration parameter for list of token classes to include in lookups */
+ public static final String PARAM_EXCLUDEDTOKENTYPES = "ExcludedTokenTypes";
+
+ // J5.0 protected Hashtable<Integer, Boolean> excludedTokenTypes;
+ protected HashSet<Integer> excludedTokenTypes;
+
+ public static final String PARAM_STOPWORDS = "StopWords";
+
+ private Set<String> stopWords = null;
+
+ /** Configuration parameter giving type of tokens */
+ public static final String PARAM_TOKENANNOTATION = "TokenAnnotation";
+
+ String tokenAnnotationName = null;
+
+ public TokenFilter(String tokenAnnotationName, String tokenTypeFeatureName,
+ String tokenClassFeatureName, Logger logger) {
+ super();
+ this.tokenAnnotationName = tokenAnnotationName;
+ this.tokenTypeFeatureName = tokenTypeFeatureName;
+ this.tokenClassFeatureName = tokenClassFeatureName;
+ this.logger = logger;
+ }
+
+ public String getTokenClassFeatureName() {
+ return tokenClassFeatureName;
+ }
+
+ public void setTokenClassFeatureName(String tokenClassFeatureName) {
+ this.tokenClassFeatureName = tokenClassFeatureName;
+ }
+
+ public Feature getTokenClassFeature() {
+ return tokenClassFeature;
+ }
+
+ public void setTokenClassFeature(Feature tokenClassFeature) {
+ this.tokenClassFeature = tokenClassFeature;
+ }
+
+ public String getTokenTypeFeatureName() {
+ return tokenTypeFeatureName;
+ }
+
+ public void setTokenTypeFeatureName(String tokenTypeFeatureName) {
+ this.tokenTypeFeatureName = tokenTypeFeatureName;
+ }
+
+ public Feature getTokenTypeFeature() {
+ return tokenTypeFeature;
+ }
+
+ public void setTokenTypeFeature(Feature tokenTypeFeature) {
+ this.tokenTypeFeature = tokenTypeFeature;
+ }
+
+ public String getTokenAnnotationName() {
+ return tokenAnnotationName;
+ }
+
+ public void setTokenAnnotationName(String tokenAnnotationName) {
+ this.tokenAnnotationName = tokenAnnotationName;
+ }
+
+ public void initConfig(AnnotatorContext annotatorContext) throws AnnotatorConfigurationException {
+
+ String[] stopWordList = null;
+ String[] includedTokenClassStrings = null;
+ String[] excludedTokenClassStrings = null;
+ Integer[] includedTokenTypeInts = null;
+ Integer[] excludedTokenTypeInts = null;
+
+ try {
+ stopWordList = (String[]) annotatorContext.getConfigParameterValue(PARAM_STOPWORDS);
+ includedTokenClassStrings = (String[]) annotatorContext
+ .getConfigParameterValue(PARAM_INCLUDEDTOKENCLASSES);
+ excludedTokenClassStrings = (String[]) annotatorContext
+ .getConfigParameterValue(PARAM_EXCLUDEDTOKENCLASSES);
+ includedTokenTypeInts = (Integer[]) annotatorContext
+ .getConfigParameterValue(PARAM_INCLUDEDTOKENTYPES);
+ excludedTokenTypeInts = (Integer[]) annotatorContext
+ .getConfigParameterValue(PARAM_EXCLUDEDTOKENTYPES);
+
+ if ((includedTokenClassStrings == null) || (includedTokenClassStrings.length == 0)) {
+ includedTokenClasses = null;
+ } else {
+ includedTokenClasses = new HashSet<String>();
+ for (int j = 0; j < includedTokenClassStrings.length; j++) {
+ includedTokenClasses.add(includedTokenClassStrings[j]);
+ }
+ }
+ if ((excludedTokenClassStrings == null) || (excludedTokenClassStrings.length == 0)) {
+ excludedTokenClasses = null;
+ } else {
+ excludedTokenClasses = new HashSet<String>();
+ for (int j = 0; j < excludedTokenClassStrings.length; j++) {
+ excludedTokenClasses.add(excludedTokenClassStrings[j]);
+ }
+ }
+
+ if ((includedTokenTypeInts == null) || (includedTokenTypeInts.length == 0)) {
+ includedTokenTypes = null;
+ } else {
+ includedTokenTypes = new HashSet<Integer>();
+ for (int j = 0; j < includedTokenTypeInts.length; j++) {
+ includedTokenTypes.add(includedTokenTypeInts[j]);
+ }
+ }
+ if ((excludedTokenTypeInts == null) || (excludedTokenTypeInts.length == 0)) {
+ excludedTokenTypes = null;
+ } else {
+ excludedTokenTypes = new HashSet<Integer>();
+ for (int j = 0; j < excludedTokenTypeInts.length; j++) {
+ excludedTokenTypes.add(excludedTokenTypeInts[j]);
+ }
+ }
+
+ if ((includedTokenClasses != null) || (excludedTokenClasses != null)) {
+ if (tokenClassFeatureName == null) {
+ throw new AnnotatorConfigurationException();
+ }
+ }
+
+ if ((includedTokenTypes != null) || (excludedTokenTypes != null)) {
+ if (tokenTypeFeatureName == null) {
+ throw new AnnotatorConfigurationException();
+ }
+ }
+ stopWords = initializeStopWordList(stopWordList);
+ } catch (Exception ie) {
+ throw new AnnotatorConfigurationException();
+ }
+
+ }
+
+ static public Set<String> initializeStopWordList(String[] stopWordsStrings)
+ throws AnnotatorContextException {
+ Set<String> retVal = new HashSet<String>();
+ if (stopWordsStrings != null) {
+ for (int i = 0; i < stopWordsStrings.length; i++) {
+ // System.err.println("Adding stopword: '" + stopWordsStrings[i].toLowerCase ());
+ retVal.add(stopWordsStrings[i].toLowerCase());
+ }
+ }
+ return retVal;
+ }
+
+ /**
+ * @param tokenClass
+ * tokenClass to look up
+ * @return true if in includedTokenClasses or if both includedTokenClasses and
+ * excludedTokenClasses are unset, of if excludedTokenClasses does not contain an entry
+ * for tokenClass parameter
+ */
+ public boolean checkTokenClass(AnnotationFS token) {
+ boolean returnValue = true;
+
+ if (tokenClassFeature != null) {
+ String tokenClass = token.getStringValue(tokenClassFeature);
+
+ if (tokenClass != null) {
+ returnValue = isOK_TokenClass(tokenClass);
+ }
+ }
+ // System.err.println ("checkTokenClass, token = " + token.getCoveredText() + ", returnValue: "
+ // + returnValue);
+ return returnValue;
+ }
+
+ public boolean checkTokenClass(DictionaryToken token) {
+ boolean returnValue = true;
+
+ if (token.isTokenClassFeatureDefined()) {
+ String tokenClass = token.getTokenClass();
+
+ if (tokenClass != null) {
+ returnValue = isOK_TokenClass(tokenClass);
+ }
+ }
+ // System.err.println ("checkTokenClass, token = " + token.getCoveredText() + ", returnValue: "
+ // + returnValue);
+ return returnValue;
+ }
+
+
+ private boolean isOK_TokenClass(String tokenClass) {
+ boolean returnValue = true;
+
+ if ((includedTokenClasses != null) && (excludedTokenClasses == null)) {
+ returnValue = (includedTokenClasses.contains(tokenClass));
+ } else if (excludedTokenClasses != null) {
+ returnValue = (!excludedTokenClasses.contains(tokenClass));
+ }
+ return returnValue;
+ }
+
+ static public boolean isStopWord(Set<String> stopWords, String tokenText) {
+ // System.err.println("isStopWord, token = '" + tokenText + "', returns = " + ((stopWords !=
+ // null) && stopWords.contains (tokenText.toLowerCase ())));
+ return ((stopWords != null) && stopWords.contains(tokenText.toLowerCase()));
+ }
+
+ public boolean isStopWord(String tokenText) {
+ // System.err.println("isStopWord, token = '" + tokenText + "', returns = " + ((stopWords !=
+ // null) && stopWords.contains (tokenText.toLowerCase ())));
+ return ((stopWords != null) && stopWords.contains(tokenText.toLowerCase()));
+ }
+
+ /**
+ * @param intValue
+ * @return
+ */
+ public boolean checkTokenType(AnnotationFS token) {
+ boolean returnValue = true;
+
+ if (tokenTypeFeature != null) {
+ Integer tokenType = new Integer(token.getIntValue(tokenTypeFeature));
+
+ if (tokenType != null) {
+ returnValue = isOK_TokenType(tokenType);
+ }
+ }
+ // System.err.println ("checkTokenType, token = " + token.getCoveredText() + ", returnValue: " +
+ // returnValue);
+ return returnValue;
+ }
+ public boolean checkTokenType(DictionaryToken token) {
+ boolean returnValue = true;
+
+ if (token.isTokenTypeFeatureDefined()) {
+ Integer tokenType = token.getType();
+
+ if (tokenType != null) {
+ returnValue = isOK_TokenType(tokenType);
+ }
+ }
+ // System.err.println ("checkTokenType, token = " + token.getCoveredText() + ", returnValue: " +
+ // returnValue);
+ return returnValue;
+ }
+
+ private boolean isOK_TokenType(Integer tokenType) {
+ boolean returnValue = true;
+
+ if ((includedTokenTypes != null) && (excludedTokenTypes == null)) {
+ returnValue = (includedTokenTypes.contains(tokenType));
+ } else if (excludedTokenTypes != null) {
+ returnValue = (!excludedTokenTypes.contains(tokenType));
+ }
+ return returnValue;
+ }
+
+ public void initTypes(TypeSystem typeSystem) throws UnknownTypeException {
+ initTypes(typeSystem, true);
+ }
+
+ /**
+ * @param typeSystem
+ * @param requireFeatureExistence -
+ * if true, if the tokenType and/or tokenClass features of the tokenAnnotation are
+ * specified, they must exist. This is to allow for the situation where these features
+ * might not exist during dictionary loading, but are needed at annotator runtime
+ * @throws UnknownTypeException
+ */
+ public void initTypes(TypeSystem typeSystem, boolean requireFeatureExistence)
+ throws UnknownTypeException {
+
+ Type tokenType = typeSystem.getType(tokenAnnotationName);
+
+ if (tokenType == null) {
+ String message = "TokenFilter.initTypes(), Could not find type: " + tokenAnnotationName;
+ System.err.println(message);
+ throw new UnknownTypeException(message);
+ }
+ if ((tokenClassFeatureName == null) || (tokenClassFeatureName.equals(""))) {
+ tokenClassFeature = null;
+ } else {
+ tokenClassFeature = tokenType.getFeatureByBaseName(tokenClassFeatureName);
+ if ((tokenClassFeature == null) && (requireFeatureExistence)) {
+ String message = "Token class feature name '" + tokenClassFeatureName
+ + "' specified, but does not exist for type: " + tokenType.getName();
+ logger.logError(message);
+ throw new UnknownTypeException(message);
+ }
+ }
+
+ if ((tokenTypeFeatureName == null) || (tokenTypeFeatureName.equals(""))) {
+ tokenTypeFeature = null;
+ } else {
+ tokenTypeFeature = tokenType.getFeatureByBaseName(tokenTypeFeatureName);
+ if ((tokenTypeFeature == null) && (requireFeatureExistence)) {
+ String message = "Token type feature name '" + tokenTypeFeatureName
+ + "' specified, but does not exist for type: " + tokenType.getName();
+ logger.logError(message);
+ throw new UnknownTypeException(message);
+ }
+ }
+ }
+
+ public boolean isOK_Token(AnnotationFS token, TokenNormalizer tokenNormalizer) {
+ if (checkTokenClass(token) && checkTokenType(token)
+ && (!isStopWord(tokenNormalizer.normalize(token.getCoveredText())))) {
+ return true;
+ }
+ return false;
+ }
+
+ public boolean isOK_Token(DictionaryToken token, TokenNormalizer tokenNormalizer) {
+ if (checkTokenClass(token) && checkTokenType(token)
+ && (!isStopWord(tokenNormalizer.normalize(token.getText())))) {
+ // System.err.println ("isOK_Token = true");
+ return true;
+ }
+ // System.err.println ("isOK_Token = false");
+ return false;
+ }
+
+}
Added: incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenNormalizer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenNormalizer.java?rev=670541&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenNormalizer.java (added)
+++ incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/TokenNormalizer.java Mon Jun 23 05:31:40 2008
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.uima.conceptMapper.support.tokens;
+
+import java.util.regex.Pattern;
+
+import org.apache.uima.analysis_engine.annotator.AnnotatorContext;
+import org.apache.uima.analysis_engine.annotator.AnnotatorContextException;
+import org.apache.uima.conceptMapper.Logger;
+import org.apache.uima.conceptMapper.support.stemmer.Stemmer;
+
+public class TokenNormalizer {
+ private static Pattern CapPat = Pattern.compile("^[A-Z][a-z]+$");
+
+ private static Pattern HasDigit = Pattern.compile("[0-9]");
+
+ /**
+ * replace instances of "," with the token "and" defaults to false
+ */
+ private static final String PARAM_REPLACE_COMMA_WITH_AND = "ReplaceCommaWithAND";
+
+ /** Configuration parameter key/label for the case matching string */
+ public static final String PARAM_CASE_MATCH = "caseMatch";
+
+ /** Configuration parameter key/label for the stemmer class spec. If left out, no stemmer is used */
+ public static final String PARAM_STEMMER_CLASS = "Stemmer";
+
+ /**
+ * Configuration parameter key/label for the stemmer dictionary, passed into the stemmer's
+ * initialization method
+ */
+ public static final String PARAM_STEMMER_DICT = "StemmerDictionary";
+
+ private boolean caseFoldAll;
+
+ private boolean caseFoldInitCap;
+
+ private boolean caseFoldDigit;
+
+ private String CASE_INSENSITIVE = "insensitive";
+
+ private String CASE_FOLD_DIGITS = "digitfold";
+
+ private String CASE_IGNORE = "ignoreall";
+
+ /** The stemmer that will perform the stemming. */
+ private Stemmer stemmer = null;
+
+ private boolean replaceCommaWithAND;
+
+ /**
+ * @param replaceCommaWithAND
+ * @param all
+ * @param digit
+ * @param cap
+ * @throws AnnotatorContextException
+ */
+ public TokenNormalizer(AnnotatorContext annotatorContext, Logger logger)
+ throws AnnotatorContextException {
+ super();
+ Boolean replaceCommaWithANDObj = (Boolean) annotatorContext
+ .getConfigParameterValue(PARAM_REPLACE_COMMA_WITH_AND);
+ boolean replaceCommaWithAND = false;
+ if (replaceCommaWithANDObj != null) {
+ replaceCommaWithAND = replaceCommaWithANDObj.booleanValue();
+ }
+ String caseMatchParam = (String) annotatorContext.getConfigParameterValue(PARAM_CASE_MATCH);
+ String stemmerParam = (String) annotatorContext.getConfigParameterValue(PARAM_STEMMER_CLASS);
+ String stemmerDict = (String) annotatorContext.getConfigParameterValue(PARAM_STEMMER_DICT);
+
+ this.replaceCommaWithAND = replaceCommaWithAND;
+ this.setCaseFoldInitCap(false);
+ this.setCaseFoldDigit(false);
+ this.setCaseFoldAll(false);
+
+ if (caseMatchParam != null) {
+ if (caseMatchParam.equalsIgnoreCase(CASE_INSENSITIVE)) {
+ this.setCaseFoldInitCap(true);
+ } else if (caseMatchParam.equalsIgnoreCase(CASE_FOLD_DIGITS)) {
+ this.setCaseFoldDigit(true);
+ } else if (caseMatchParam.equalsIgnoreCase(CASE_IGNORE)) {
+ this.setCaseFoldAll(true);
+ }
+ }
+
+ if (stemmerParam != null) {
+ try {
+ Class<?> stemmerClass = Class.forName(stemmerParam);
+ setStemmer((Stemmer) stemmerClass.newInstance());
+ getStemmer().initialize(stemmerDict);
+ } catch (Exception e) {
+ logger.logError("Exception trying to instantiate stemmer class: '" + stemmerParam
+ + "', original exception:" + e.getMessage());
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * @return Returns the stemmer.
+ */
+ public Stemmer getStemmer() {
+ return stemmer;
+ }
+
+ /**
+ * @param stemmer
+ * The stemmer to set.
+ */
+ public void setStemmer(Stemmer stemmer) {
+ this.stemmer = stemmer;
+ }
+
+ public boolean shouldStem() {
+ return (getStemmer() != null);
+ }
+
+ /**
+ * @return Returns the caseFoldAll.
+ */
+ public boolean isCaseFoldAll() {
+ return caseFoldAll;
+ }
+
+ /**
+ * @param caseFoldAll
+ * The caseFoldAll to set.
+ */
+ public void setCaseFoldAll(boolean caseFoldAll) {
+ this.caseFoldAll = caseFoldAll;
+ }
+
+ /**
+ * @return Returns the caseFoldDigit.
+ */
+ public boolean isCaseFoldDigit() {
+ return caseFoldDigit;
+ }
+
+ /**
+ * @param caseFoldDigit
+ * The caseFoldDigit to set.
+ */
+ public void setCaseFoldDigit(boolean caseFoldDigit) {
+ this.caseFoldDigit = caseFoldDigit;
+ }
+
+ /**
+ * @return Returns the caseFoldInitCap.
+ */
+ public boolean isCaseFoldInitCap() {
+ return caseFoldInitCap;
+ }
+
+ /**
+ * @param caseFoldInitCap
+ * The caseFoldInitCap to set.
+ */
+ public void setCaseFoldInitCap(boolean caseFoldInitCap) {
+ this.caseFoldInitCap = caseFoldInitCap;
+ }
+
+ public boolean shouldFoldCase(String token) {
+ return (caseFoldAll || (caseFoldInitCap && CapPat.matcher(token).matches()) || (caseFoldDigit && HasDigit
+ .matcher(token).find()));
+ }
+
+ /**
+ * If one of the case folding flags is true and the input string matches the character pattern
+ * corresponding to that flag, then convert all letters to lowercase.
+ *
+ * @param token
+ * The string to case fold
+ *
+ * @return The case folded string
+ */
+ public String foldCase(String token) {
+ if (shouldFoldCase(token)) {
+ return token.trim().toLowerCase();
+ }
+ return token;
+ }
+
+ /**
+ * If the stemming flag is true, then return the stemmed form of the supplied word using the
+ * Porter stemmer.
+ *
+ * @param token
+ * the word to stem
+ * @return the original word if the stemming flag is false, otherwise the stemmed form of the word
+ */
+ public String stem(String token) {
+ if (shouldStem()) {
+ return getStemmer().stem(token.trim());
+ }
+ return token;
+ }
+
+ public String normalize(String token) {
+ if (replaceCommaWithAND && token.equals(",")) {
+ return stem(foldCase("and"));
+ }
+ return stem(foldCase(token));
+ }
+}
Added: incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/UnknownTypeException.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/UnknownTypeException.java?rev=670541&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/UnknownTypeException.java (added)
+++ incubator/uima/sandbox/trunk/ConceptMapper/src/main/java/org/apache/uima/conceptMapper/support/tokens/UnknownTypeException.java Mon Jun 23 05:31:40 2008
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.uima.conceptMapper.support.tokens;
+
+public class UnknownTypeException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ private String message;
+
+ public UnknownTypeException(String message) {
+ super();
+ this.message = message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+}