private void createCodeMappings ( MtasTokenIdFactory mtasTokenIdFactory , Level level , String stringValue , int offsetStart , int offsetEnd , int realOffsetStart , int realOffsetEnd , List < Integer > codePositions ) throws IOException { String [ ] stringValues = MtasPennTreebankReader . createStrings ( stringValue , Pattern . quote ( STRING_SPLITTER ) ) ; MtasToken token = new MtasTokenString ( mtasTokenIdFactory . createTokenId ( ) , level . node , filterString ( stringValues [ 0 ] . trim ( ) ) ) ; token . setOffset ( offsetStart , offsetEnd ) ; token . setRealOffset ( realOffsetStart , realOffsetEnd ) ; token . addPositions ( codePositions . stream ( ) . mapToInt ( i -> i ) . toArray ( ) ) ; tokenCollection . add ( token ) ; level . tokens . add ( token ) ; }
Creates the code mappings .