src/main/java/org/openkoreantext/processor/OpenKoreanTextProcessorJava.java
public static List<KoreanTokenJava> tokensToJavaKoreanTokenList(Seq<KoreanToken> tokens, boolean keepSpace) {
    Iterator<KoreanToken> tokenized = tokens.iterator();
    List<KoreanTokenJava> output = new LinkedList<>();
    while (tokenized.hasNext()) {
      KoreanToken token = tokenized.next();
      String stem = "";
      if (token.stem().nonEmpty()) {
        stem += token.stem().get();
      }
      if (keepSpace || token.pos() != KoreanPos.Space()) {
        output.add(new KoreanTokenJava(
            token.text(),
            KoreanPosJava.valueOf(token.pos().toString()),
            token.offset(),
            token.length(),
            token.unknown(),
            stem
        ));
      }
    }
    return output;
  }
public static List<KoreanTokenJava> tokensToJavaKoreanTokenList(Seq<KoreanToken> tokens, boolean keepSpace) {
    Iterator<KoreanToken> tokenized = tokens.iterator();
    List<KoreanTokenJava> output = new LinkedList<>();
    while (tokenized.hasNext()) {
      KoreanToken token = tokenized.next();
      String stem = "";
      if (token.stem().nonEmpty()) {
        stem += token.stem().get();
      }
      if (keepSpace || token.pos() != KoreanPos.Space()) {
        output.add(new KoreanTokenJava(
            token.text(),
            KoreanPosJava.valueOf(token.pos().toString()),
            token.offset(),
            token.length(),
            token.unknown(),
            stem
        ));
      }
    }
    return output;
  }
public static List < KoreanTokenJava > tokensToJavaKoreanTokenList ( Seq < KoreanToken > tokens , boolean keepSpace ) { Iterator < KoreanToken > tokenized = tokens . iterator ( ) ; List < KoreanTokenJava > output = new LinkedList <> ( ) ; while ( tokenized . hasNext ( ) ) { KoreanToken token = tokenized . next ( ) ; String stem = "" ; if ( token . stem ( ) . nonEmpty ( ) ) { stem += token . stem ( ) . get ( ) ; } if ( keepSpace || token . pos ( ) != KoreanPos . Space ( ) ) { output . add ( new KoreanTokenJava ( token . text ( ) , KoreanPosJava . valueOf ( token . pos ( ) . toString ( ) ) , token . offset ( ) , token . length ( ) , token . unknown ( ) , stem ) ) ; } } return output ; }
Transforms the tokenization output to List<KoreanTokenJava>

@param tokens Korean tokens (output of tokenize(CharSequence text)).
@return List of KoreanTokenJava.
Transforms the tokenization output to List<KoreanTokenJava >