public static TagMask createTagMaskFromToken(Token token, String text) {
		TagMask tm = new TagMask();
		Matcher m = REPLACE_R2.matcher(text);
		while (m.find()) {
			String property = m.group(1);
			switch (property) {
			case "number":
				tm.setNumber(token.getMorphologicalTag().getNumberE());
				break;
			case "gender":
				tm.setGender(token.getMorphologicalTag().getGenderE());
				break;
			case "class":
				tm.setClazz(token.getMorphologicalTag().getClazzE());
				break;
			case "person":
				tm.setPerson(token.getMorphologicalTag().getPersonE());
				break;
			case "tense":
				tm.setTense(token.getMorphologicalTag().getTense());
				break;
			case "mood":
				tm.setMood(token.getMorphologicalTag().getMood());
				break;
			default:
				break;
			}

		}

		return tm;
	}
public static TagMask createTagMaskFromToken ( Token token , String text ) { TagMask tm = new TagMask ( ) ; Matcher m = REPLACE_R2 . matcher ( text ) ; while ( m . find ( ) ) { String property = m . group ( 1 ) ; switch ( property ) { case "number" : tm . setNumber ( token . getMorphologicalTag ( ) . getNumberE ( ) ) ; break ; case "gender" : tm . setGender ( token . getMorphologicalTag ( ) . getGenderE ( ) ) ; break ; case "class" : tm . setClazz ( token . getMorphologicalTag ( ) . getClazzE ( ) ) ; break ; case "person" : tm . setPerson ( token . getMorphologicalTag ( ) . getPersonE ( ) ) ; break ; case "tense" : tm . setTense ( token . getMorphologicalTag ( ) . getTense ( ) ) ; break ; case "mood" : tm . setMood ( token . getMorphologicalTag ( ) . getMood ( ) ) ; break ; default : break ; } } return tm ; }
Returns a TagMask with the attributes collected from the given token.

@param token
the token whose attributes will be collected.
@param text
a string containing the attributes to get from the token,
e.g., "number  gender"
@returna a TagMask object with the attributes collected