test_class.file: storm/trident-ml/src/test/java/com/github/pmerienne/trident/ml/preprocessing/TextInstanceCreatorTest.java
test_class.identifier: TextInstanceCreatorTest
test_case.body: @Test
  	public void testCreateInstanceWithLabel() {
  		// Given
  		TextInstanceCreator<Integer> instanceCreator = new TextInstanceCreator<Integer>(true);
  
  		Integer expectedLabel = 1;
  		String expectedText = "I can't argue with some arguments on argus with argues";
  		TridentTuple tuple = mock(TridentTuple.class);
  		when(tuple.get(0)).thenReturn(expectedLabel);
  		when(tuple.getString(1)).thenReturn(expectedText);
  
  		// When
  		TextInstance<Integer> actualInstance = instanceCreator.createInstance(tuple);
  
  		// Then
  		TextInstance<Integer> expectedInstance = new TextInstance<Integer>(expectedLabel, Arrays.asList("i", "can't", "argu", "some", "argument", "argu", "argu"));
  		assertEquals(expectedInstance, actualInstance);
  	}
test_case.class_method_signature: TextInstanceCreatorTest.testCreateInstanceWithLabel()
test_case.full_signature: @Test public void testCreateInstanceWithLabel()
test_case.identifier: testCreateInstanceWithLabel
test_case.invocations: mock thenReturn when get thenReturn when getString createInstance asList assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateInstanceWithLabel()
focal_class.declarator: serialVersionUID = 3312351524410720639L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 3312351524410720639L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: withLabel = true
focal_class.modifier: private
focal_class.original_string: private boolean withLabel = true;
focal_class.type: boolean
focal_class.var_name: withLabel
focal_class.declarator: textAnalyser = new EnglishTokenizer()
focal_class.modifier: private
focal_class.original_string: private TextTokenizer textAnalyser = new EnglishTokenizer();
focal_class.type: TextTokenizer
focal_class.var_name: textAnalyser
focal_class.file: storm/trident-ml/src/main/java/com/github/pmerienne/trident/ml/preprocessing/TextInstanceCreator.java
focal_class.identifier: TextInstanceCreator
focal_class.class_method_signature: TextInstanceCreator.TextInstanceCreator()
focal_class.full_signature: public  TextInstanceCreator()
focal_class.identifier: TextInstanceCreator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  TextInstanceCreator()
focal_class.class_method_signature: TextInstanceCreator.TextInstanceCreator(boolean withLabel)
focal_class.full_signature: public  TextInstanceCreator(boolean withLabel)
focal_class.identifier: TextInstanceCreator
focal_class.modifiers: public
focal_class.parameters: (boolean withLabel)
focal_class.signature:  TextInstanceCreator(boolean withLabel)
focal_class.class_method_signature: TextInstanceCreator.TextInstanceCreator(boolean withLabel, TextTokenizer textAnalyser)
focal_class.full_signature: public  TextInstanceCreator(boolean withLabel, TextTokenizer textAnalyser)
focal_class.identifier: TextInstanceCreator
focal_class.modifiers: public
focal_class.parameters: (boolean withLabel, TextTokenizer textAnalyser)
focal_class.signature:  TextInstanceCreator(boolean withLabel, TextTokenizer textAnalyser)
focal_class.class_method_signature: TextInstanceCreator.execute(TridentTuple tuple, TridentCollector collector)
focal_class.full_signature: @Override public void execute(TridentTuple tuple, TridentCollector collector)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (TridentTuple tuple, TridentCollector collector)
focal_class.return: void
focal_class.signature: void execute(TridentTuple tuple, TridentCollector collector)
focal_class.class_method_signature: TextInstanceCreator.createInstance(TridentTuple tuple)
focal_class.full_signature: @SuppressWarnings({ "unchecked", "rawtypes" }) protected TextInstance<L> createInstance(TridentTuple tuple)
focal_class.identifier: createInstance
focal_class.modifiers: @SuppressWarnings({ "unchecked", "rawtypes" }) protected
focal_class.parameters: (TridentTuple tuple)
focal_class.return: TextInstance<L>
focal_class.signature: TextInstance<L> createInstance(TridentTuple tuple)
focal_class.class_method_signature: TextInstanceCreator.extractTokens(String text)
focal_class.full_signature: protected List<String> extractTokens(String text)
focal_class.identifier: extractTokens
focal_class.modifiers: protected
focal_class.parameters: (String text)
focal_class.return: List<String>
focal_class.signature: List<String> extractTokens(String text)
focal_class.class_method_signature: TextInstanceCreator.isWithLabel()
focal_class.full_signature: public boolean isWithLabel()
focal_class.identifier: isWithLabel
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isWithLabel()
focal_class.class_method_signature: TextInstanceCreator.setWithLabel(boolean withLabel)
focal_class.full_signature: public void setWithLabel(boolean withLabel)
focal_class.identifier: setWithLabel
focal_class.modifiers: public
focal_class.parameters: (boolean withLabel)
focal_class.return: void
focal_class.signature: void setWithLabel(boolean withLabel)
focal_class.class_method_signature: TextInstanceCreator.getTextAnalyser()
focal_class.full_signature: public TextTokenizer getTextAnalyser()
focal_class.identifier: getTextAnalyser
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TextTokenizer
focal_class.signature: TextTokenizer getTextAnalyser()
focal_class.class_method_signature: TextInstanceCreator.setTextAnalyser(TextTokenizer textAnalyser)
focal_class.full_signature: public void setTextAnalyser(TextTokenizer textAnalyser)
focal_class.identifier: setTextAnalyser
focal_class.modifiers: public
focal_class.parameters: (TextTokenizer textAnalyser)
focal_class.return: void
focal_class.signature: void setTextAnalyser(TextTokenizer textAnalyser)
focal_class.superclass: extends BaseFunction
focal_method.body: @SuppressWarnings({ "unchecked", "rawtypes" })
  	protected TextInstance<L> createInstance(TridentTuple tuple) {
  		L label = this.withLabel ? (L) tuple.get(0) : null;
  		String text = tuple.getString(this.withLabel ? 1 : 0);
  
  		List<String> tokens = this.extractTokens(text);
  
  		TextInstance<L> instance = new TextInstance(label, tokens);
  		return instance;
  	}
focal_method.class_method_signature: TextInstanceCreator.createInstance(TridentTuple tuple)
focal_method.full_signature: @SuppressWarnings({ "unchecked", "rawtypes" }) protected TextInstance<L> createInstance(TridentTuple tuple)
focal_method.identifier: createInstance
focal_method.invocations: get getString extractTokens
focal_method.modifiers: @SuppressWarnings({ "unchecked", "rawtypes" }) protected
focal_method.parameters: (TridentTuple tuple)
focal_method.return: TextInstance<L>
focal_method.signature: TextInstance<L> createInstance(TridentTuple tuple)