Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
wlfxb - a library for creating and processing of TCF data streams. Copyright (C) Yana Panchenko. This file is part of wlfxb. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 
 package eu.clarin.weblicht.wlfxb.tc.xb;
 
 import java.util.List;

Author(s):
Yana Panchenko
 
 
     public static final String XML_NAME = "orthography";
 
     protected OrthographyLayerStored() {
     }
 
     protected OrthographyLayerStored(TextCorpusLayersConnector connector) {
         this. = connector;
     }
 
     protected void setLayersConnector(TextCorpusLayersConnector connector) {
         this. = connector;
         for (int i = 0; i < .size(); i++) {
             OrthCorrectionStored corr = .get(i);
             for (String tokRef : corr.tokRefs) {
                 connector.token2ItsCorrection.put(connector.tokenId2ItsToken.get(tokRef), corr);
             }
         }
     }
 
     @Override
     public boolean isEmpty() {
         return .isEmpty();
     }
 
     @Override
     public int size() {
         return .size();
     }
 
     @Override
     public OrthCorrection getCorrection(int index) {
         OrthCorrection corr = .get(index);
         return corr;
     }
 
     @Override
     public OrthCorrection getCorrection(Token token) {
         OrthCorrection corr = ..get(token);
         return corr;
     }
 
     @Override
     public Token[] getTokens(OrthCorrection correction) {
         if (correction instanceof OrthCorrectionStored) {
             OrthCorrectionStored corrStored = (OrthCorrectionStoredcorrection;
             return WlfUtilities.tokenIdsToTokens(corrStored.tokRefs.);
         } else {
             return null;
         }
     }
    @Override
    public OrthCorrection addCorrection(String correctionStringToken correctedTokenCorrectionOperation operation) {
        List<TokencorrTokens = Arrays.asList(new Token[]{correctedToken});
        return addCorrection(correctionStringcorrTokensoperation);
    }
    @Override
    public OrthCorrection addCorrection(String correctionStringList<TokencorrectedTokensCorrectionOperation operation) {
        OrthCorrectionStored corr = new OrthCorrectionStored();
        corr.corrString = correctionString;
        corr.tokRefs = new String[correctedTokens.size()];
        corr.operation = operation;
        for (int i = 0; i < correctedTokens.size(); i++) {
            Token corrToken = correctedTokens.get(i);
            corr.tokRefs[i] = corrToken.getID();
            ..put(corrTokencorr);
        }
        .add(corr);
        return corr;
    }
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(" : ");
        sb.append(.toString());
        return sb.toString();
    }
New to GrepCode? Check out our FAQ X