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 2007/11/22 11:24:38 UTC
svn commit: r597365 -
/incubator/uima/sandbox/trunk/WhitespaceTokenizer/src/main/java/org/apache/uima/annotator/WhitespaceTokenizer.java
Author: mbaessler
Date: Thu Nov 22 02:24:37 2007
New Revision: 597365
URL: http://svn.apache.org/viewvc?rev=597365&view=rev
Log:
UIMA-645
update code to use Java 5 generics
https://issues.apache.org/jira/browse/UIMA-645
Modified:
incubator/uima/sandbox/trunk/WhitespaceTokenizer/src/main/java/org/apache/uima/annotator/WhitespaceTokenizer.java
Modified: incubator/uima/sandbox/trunk/WhitespaceTokenizer/src/main/java/org/apache/uima/annotator/WhitespaceTokenizer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/WhitespaceTokenizer/src/main/java/org/apache/uima/annotator/WhitespaceTokenizer.java?rev=597365&r1=597364&r2=597365&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/WhitespaceTokenizer/src/main/java/org/apache/uima/annotator/WhitespaceTokenizer.java (original)
+++ incubator/uima/sandbox/trunk/WhitespaceTokenizer/src/main/java/org/apache/uima/annotator/WhitespaceTokenizer.java Thu Nov 22 02:24:37 2007
@@ -68,7 +68,7 @@
private Logger logger;
- private static List punctuations = Arrays.asList(new String[] { ".", "!", "?" });
+ private static List<String> punctuations = Arrays.asList(new String[] { ".", "!", "?" });
/*
* (non-Javadoc)
@@ -79,7 +79,7 @@
public void process(JCas aJCas, ResultSpecification aResultSpec) throws AnnotatorProcessException {
this.logger.log(Level.INFO, "Whitespace tokenizer starts processing");
- // get text content from teh CAS
+ // get text content from the CAS
char[] textContent = aJCas.getCas().getDocumentText().toCharArray();
this.cas = aJCas.getCas();
int tokenStart = UNDEFINED;
@@ -104,7 +104,7 @@
// check if current character is a letter or number
if (currentCharType == CH_LETTER || currentCharType == CH_NUMBER) {
- // check if it is the frist letter of a token
+ // check if it is the first letter of a token
if (tokenStart == UNDEFINED) {
// start new token here
tokenStart = currentCharPos;
@@ -187,7 +187,7 @@
}
/**
- * create an annoation of the given type in the CAS using startPos and endPos.
+ * create an annotation of the given type in the CAS using startPos and endPos.
*
* @param annotationType annotation type
* @param startPos annotation start position
@@ -204,7 +204,7 @@
* CH_LETTER for all letters
* CH_NUMBER for all numbers
* CH_WHITESPACE for all whitespace characters
- * CH_PUNCTUATUATION for all puctuation characters
+ * CH_PUNCTUATUATION for all punctuation characters
* CH_NEWLINE for all new line characters
* CH_SPECIAL for all other characters that are not in any of the groups above
*