edu.stanford.nlp.ling.Label



API Populatity

1 Client projects

Project: edu.stanford

Package: edu.stanford.nlp

Project stanfordnlp/CoreNLP in file ...arser.lexparser.GermanUnknownWordModelTrainer.java (2013-08-30)
@@ -1,20 +1,18 @@
 package edu.stanford.nlp.parser.lexparser;
 
 import java.util.Map;
-
+import edu.stanford.nlp.ling.Label;
 
 public class GermanUnknownWordModelTrainer
-  extends BaseUnknownWordModelTrainer {
-
-  @Override
+  extends BaseUnknownWordModelTrainer 
+{
   protected UnknownWordModel buildUWM() {
     Map<String,Float> unknownGT = null;
     if (useGT) {
       unknownGT = unknownGTTrainer.unknownGT;
     }
-    return new GermanUnknownWordModel(op, lex, wordIndex, tagIndex,
-                                      unSeenCounter, tagHash,
+    return new GermanUnknownWordModel(op, lex, wordIndex, tagIndex, 
+                                      unSeenCounter, tagHash, 
                                       unknownGT, seenEnd);
   }
-
 }
\ No newline at end of file
Project stanfordnlp/CoreNLP in file ....nlp.international.french.process.FrenchLexer.java (2013-12-09)
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.4.3 on 12/8/13 10:33 AM */
+/* The following code was generated by JFlex 1.4.3 on 10/25/13 12:28 AM */
 
 package edu.stanford.nlp.international.french.process;
 
@@ -7,7 +7,6 @@ import java.util.logging.Logger;
 import java.util.Properties;
 
 import edu.stanford.nlp.ling.CoreLabel;
-import edu.stanford.nlp.ling.Label;
 import edu.stanford.nlp.ling.CoreAnnotations;
 import edu.stanford.nlp.process.CoreLabelTokenFactory;
 import edu.stanford.nlp.process.LexedTokenFactory;
@@ -15,7 +14,7 @@ import edu.stanford.nlp.process.LexedTokenFactory;
 /**
  *  A tokenizer for French. Adapted from PTBTokenizer, but with extra
  *  rules for French orthography.
-
+ 
  *  @author Spence Green
  */
 
@@ -8333,7 +8332,7 @@ class FrenchLexer {
    * @param tf The LexedTokenFactory that will be invoked to convert
    *    each substring extracted by the lexer into some kind of Object
    *    (such as a Word or CoreLabel).
-   * @param props Options to the tokenizer (see constructor Javadoc)
+   * @param options Options to the tokenizer (see constructor Javadoc)
    */
   public FrenchLexer(Reader r, LexedTokenFactory<?> tf, Properties props) {
     this(r);
@@ -8428,8 +8427,8 @@ class FrenchLexer {
   private boolean ptb3Dashes;
   private boolean escapeForwardSlashAsterisk = false;
   private boolean strictTreebank3;
-
-
+  
+  
   /*
    * This has now been extended to cover the main Windows CP1252 characters,
    * at either their correct Unicode codepoints, or in their invalid
@@ -8537,25 +8536,22 @@ class FrenchLexer {
   private Object getNext(String txt, String originalText) {
     return getNext(txt, originalText, null);
   }
-
+  
   private Object getNext(String txt, String originalText, String annotation) {
     txt = removeSoftHyphens(txt);
-    Label w = (Label) tokenFactory.makeToken(txt, yychar, yylength());
-    if (invertible || annotation != null) {
-      CoreLabel word = (CoreLabel) w;
-      if (invertible) {
-        String str = prevWordAfter.toString();
-        prevWordAfter.setLength(0);
-        word.set(CoreAnnotations.OriginalTextAnnotation.class, originalText);
-        word.set(CoreAnnotations.BeforeAnnotation.class, str);
-        prevWord.set(CoreAnnotations.AfterAnnotation.class, str);
-        prevWord = word;
-      }
-      if (annotation != null) {
-        word.set(CoreAnnotations.ParentAnnotation.class, annotation);
-      }
+    CoreLabel word = (CoreLabel) tokenFactory.makeToken(txt, yychar, yylength());
+    if (invertible) {
+      String str = prevWordAfter.toString();
+      prevWordAfter.setLength(0);
+      word.set(CoreAnnotations.OriginalTextAnnotation.class, originalText);
+      word.set(CoreAnnotations.BeforeAnnotation.class, str);
+      prevWord.set(CoreAnnotations.AfterAnnotation.class, str);
+      prevWord = word;
+    }
+    if (annotation != null) {
+      word.set(CoreAnnotations.ParentAnnotation.class, annotation);      
     }
-    return w;
+    return word;
   }
 
   private Object getNormalizedAmpNext() {
@@ -9204,8 +9200,8 @@ class FrenchLexer {
           if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
             zzAtEOF = true;
               {
-                if (invertible) {
-            prevWordAfter.append(yytext());
+                if (invertible) { 
+            prevWordAfter.append(yytext()); 
             String str = prevWordAfter.toString();
             prevWordAfter.setLength(0);
             prevWord.set(CoreAnnotations.AfterAnnotation.class, str);
Project stanfordnlp/CoreNLP in file ....nlp.international.french.process.FrenchLexer.java (2013-12-08)
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.4.3 on 10/25/13 12:28 AM */
+/* The following code was generated by JFlex 1.4.3 on 12/8/13 10:33 AM */
 
 package edu.stanford.nlp.international.french.process;
 
@@ -7,6 +7,7 @@ import java.util.logging.Logger;
 import java.util.Properties;
 
 import edu.stanford.nlp.ling.CoreLabel;
+import edu.stanford.nlp.ling.Label;
 import edu.stanford.nlp.ling.CoreAnnotations;
 import edu.stanford.nlp.process.CoreLabelTokenFactory;
 import edu.stanford.nlp.process.LexedTokenFactory;
@@ -14,7 +15,7 @@ import edu.stanford.nlp.process.LexedTokenFactory;
 /**
  *  A tokenizer for French. Adapted from PTBTokenizer, but with extra
  *  rules for French orthography.
- 
+
  *  @author Spence Green
  */
 
@@ -8332,7 +8333,7 @@ class FrenchLexer {
    * @param tf The LexedTokenFactory that will be invoked to convert
    *    each substring extracted by the lexer into some kind of Object
    *    (such as a Word or CoreLabel).
-   * @param options Options to the tokenizer (see constructor Javadoc)
+   * @param props Options to the tokenizer (see constructor Javadoc)
    */
   public FrenchLexer(Reader r, LexedTokenFactory<?> tf, Properties props) {
     this(r);
@@ -8427,8 +8428,8 @@ class FrenchLexer {
   private boolean ptb3Dashes;
   private boolean escapeForwardSlashAsterisk = false;
   private boolean strictTreebank3;
-  
-  
+
+
   /*
    * This has now been extended to cover the main Windows CP1252 characters,
    * at either their correct Unicode codepoints, or in their invalid
@@ -8536,22 +8537,25 @@ class FrenchLexer {
   private Object getNext(String txt, String originalText) {
     return getNext(txt, originalText, null);
   }
-  
+
   private Object getNext(String txt, String originalText, String annotation) {
     txt = removeSoftHyphens(txt);
-    CoreLabel word = (CoreLabel) tokenFactory.makeToken(txt, yychar, yylength());
-    if (invertible) {
-      String str = prevWordAfter.toString();
-      prevWordAfter.setLength(0);
-      word.set(CoreAnnotations.OriginalTextAnnotation.class, originalText);
-      word.set(CoreAnnotations.BeforeAnnotation.class, str);
-      prevWord.set(CoreAnnotations.AfterAnnotation.class, str);
-      prevWord = word;
-    }
-    if (annotation != null) {
-      word.set(CoreAnnotations.ParentAnnotation.class, annotation);      
+    Label w = (Label) tokenFactory.makeToken(txt, yychar, yylength());
+    if (invertible || annotation != null) {
+      CoreLabel word = (CoreLabel) w;
+      if (invertible) {
+        String str = prevWordAfter.toString();
+        prevWordAfter.setLength(0);
+        word.set(CoreAnnotations.OriginalTextAnnotation.class, originalText);
+        word.set(CoreAnnotations.BeforeAnnotation.class, str);
+        prevWord.set(CoreAnnotations.AfterAnnotation.class, str);
+        prevWord = word;
+      }
+      if (annotation != null) {
+        word.set(CoreAnnotations.ParentAnnotation.class, annotation);
+      }
     }
-    return word;
+    return w;
   }
 
   private Object getNormalizedAmpNext() {
@@ -9200,8 +9204,8 @@ class FrenchLexer {
           if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
             zzAtEOF = true;
               {
-                if (invertible) { 
-            prevWordAfter.append(yytext()); 
+                if (invertible) {
+            prevWordAfter.append(yytext());
             String str = prevWordAfter.toString();
             prevWordAfter.setLength(0);
             prevWord.set(CoreAnnotations.AfterAnnotation.class, str);