An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
<Prozess 1><Thread 1:1>get_file_attributes()create_file()vm_read()vm_read()vm_read()vm_read()vm_read()vm_read()enum_modules()</Thread 1></Prozess 1><Prozess 2><Thread 2>load_image()get_system_directory()get_file_attributes()open_key()open_key()delete_key()</Thread 2></Prozess 2>
/* * RapidMiner * * Copyright (C) 2001-2009 by Rapid-I and the contributors * * Complete list of developers available at our web site: * * http://rapid-i.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */package com.rapidminer.operator.text.io.tokenizer;import java.util.ArrayList;import java.util.List;import com.rapidminer.operator.OperatorDescription;import com.rapidminer.operator.UserError;import com.rapidminer.operator.text.Document;import com.rapidminer.operator.text.Token;import com.rapidminer.operator.text.io.AbstractTokenProcessor;import com.rapidminer.parameter.ParameterType;import com.rapidminer.parameter.ParameterTypeString;/** * This class tokenizes all tokens in the input. * The characters used as separators can be specified. * * @author Ryujakk */public class AdvancedTokenizerOperator extends AbstractTokenProcessor { public static final String SEPARATORS = "characters"; public AdvancedTokenizerOperator(OperatorDescription description) { super(description); }@Override protected Document doWork(Document textObject) throws UserError { String separators = getParameterAsString(SEPARATORS); List<Token> newSequence = new ArrayList<Token>(); for (Token token: textObject.getTokenSequence()) { char[] tokenChars = token.getToken().toCharArray(); int start = 0; for (int i = 0; i < tokenChars.length; i++) { if (separators.contains(""+tokenChars)) { if (i - start > 0) { newSequence.add(new Token(new String(tokenChars, start, i - start), token)); } start = i + 1; } } if (tokenChars.length - start > 0) newSequence.add(new Token(new String(tokenChars, start, tokenChars.length - start), token)); } textObject.setTokenSequence(newSequence); return textObject; }@Override public List<ParameterType> getParameterTypes() { List<ParameterType> types = super.getParameterTypes(); types.add(new ParameterTypeString(SEPARATORS, "The characters used to separate individual tokens.", " ")); return types; }}