Java Code Examples for codemining.languagetools.ITokenizer#tokenListFromCode()

The following examples show how to use codemining.languagetools.ITokenizer#tokenListFromCode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TokenizeJavascriptCodeTest.java    From tassal with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample1(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE1);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 2
Source File: TokenizeJavascriptCodeTest.java    From codemining-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample3(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE3);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 3
Source File: TokenizeJavascriptCodeTest.java    From codemining-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample2(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE2);

	for (int i = 0; i < TOKENS_SAMPLE2.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE2[i]);
	}
}
 
Example 4
Source File: TokenizeJavascriptCodeTest.java    From codemining-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample1(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE1);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 5
Source File: TokenizeJavaCodeTest.java    From codemining-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample3(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE3);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 6
Source File: TokenizeJavaCodeTest.java    From codemining-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample2(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE2);

	for (int i = 0; i < TOKENS_SAMPLE2.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE2[i]);
	}
}
 
Example 7
Source File: TokenizeJavaCodeTest.java    From codemining-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample1(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE1);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 8
Source File: TokenizeJavascriptCodeTest.java    From tassal with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample3(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE3);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 9
Source File: TokenizeJavascriptCodeTest.java    From tassal with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample2(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE2);

	for (int i = 0; i < TOKENS_SAMPLE2.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE2[i]);
	}
}
 
Example 10
Source File: TokenizeJavaCodeTest.java    From api-mining with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample1(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE1);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 11
Source File: TokenizeJavaCodeTest.java    From tassal with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample3(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE3);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 12
Source File: TokenizeJavaCodeTest.java    From tassal with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample2(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE2);

	for (int i = 0; i < TOKENS_SAMPLE2.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE2[i]);
	}
}
 
Example 13
Source File: TokenizeJavaCodeTest.java    From tassal with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample1(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE1);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 14
Source File: TokenizeJavascriptCodeTest.java    From api-mining with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample3(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE3);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 15
Source File: TokenizeJavascriptCodeTest.java    From api-mining with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample2(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE2);

	for (int i = 0; i < TOKENS_SAMPLE2.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE2[i]);
	}
}
 
Example 16
Source File: TokenizeJavascriptCodeTest.java    From api-mining with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample1(final ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE1);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 17
Source File: TokenizeJavaCodeTest.java    From api-mining with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample3(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE3);
	for (int i = 0; i < TOKENS_SAMPLE1.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE1[i]);
	}
	assertEquals(tok.size(), TOKENS_SAMPLE1.length);
}
 
Example 18
Source File: TokenizeJavaCodeTest.java    From api-mining with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param tokenizer
 */
protected void testSample2(ITokenizer tokenizer) {
	final List<String> tok = tokenizer.tokenListFromCode(CODE_SAMPLE2);

	for (int i = 0; i < TOKENS_SAMPLE2.length; i++) {
		assertEquals(tok.get(i), TOKENS_SAMPLE2[i]);
	}
}