public static String wordToChunkerFormat(Word word, boolean toolgenerated) {
		if (!word.isRecognized())
			return ("[]");

		StringBuilder sb = new StringBuilder();
		sb.append('[');
		
		if (word.getCorrectWordform() != null) {
			wordformToChunkerFormat(word.getToken(), toolgenerated, sb, word.getCorrectWordform());
		} else
			for (Wordform vf : word.wordforms) {
				if (sb.length() > 1)
					sb.append(',');
				wordformToChunkerFormat(word.getToken(), toolgenerated, sb, vf);
			}
		
		sb.append(']');
		
		return sb.toString();
	}
public static String wordToChunkerFormat(Word word, boolean toolgenerated) {
		if (!word.isRecognized())
			return ("[]");

		StringBuilder sb = new StringBuilder();
		sb.append('[');
		
		if (word.getCorrectWordform() != null) {
			wordformToChunkerFormat(word.getToken(), toolgenerated, sb, word.getCorrectWordform());
		} else
			for (Wordform vf : word.wordforms) {
				if (sb.length() > 1)
					sb.append(',');
				wordformToChunkerFormat(word.getToken(), toolgenerated, sb, vf);
			}
		
		sb.append(']');
		
		return sb.toString();
	}
public static String wordToChunkerFormat ( Word word , boolean toolgenerated ) { if ( ! word . isRecognized ( ) ) return ( "[]" ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( ' ' ) ; if ( word . getCorrectWordform ( ) != null ) { wordformToChunkerFormat ( word . getToken ( ) , toolgenerated , sb , word . getCorrectWordform ( ) ) ; } else for ( Wordform vf : word . wordforms ) { if ( sb . length ( ) > 1 ) sb . append ( ' ' ) ; wordformToChunkerFormat ( word . getToken ( ) , toolgenerated , sb , vf ) ; } sb . append ( ' ' ) ; return sb . toString ( ) ; }
Converts Word object to Prolog format necessary for chunker (A-table
record).
@param word			Word to be converted.
@param toolgenerated	how the source for this word should be identified
- 'tool' or 'guess'/'dict'.
Nobody remembers the practical consequences. :)
Probably this is used, when deciding whether to
delete these records from A-table before rechunking.
@return	transformed result.
Converts Word object to Prolog format necessary for chunker ( A - table record ) .