use of org.junit.Ignore in project deeplearning4j by deeplearning4j.
the class PerformanceTests method testWord2VecCBOWBig.
@Ignore
@Test
public void testWord2VecCBOWBig() throws Exception {
SentenceIterator iter = new BasicLineIterator("/home/raver119/Downloads/corpus/namuwiki_raw.txt");
//iter = new BasicLineIterator("/home/raver119/Downloads/corpus/ru_sentences.txt");
//SentenceIterator iter = new BasicLineIterator("/ext/DATASETS/ru/Socials/ru_sentences.txt");
TokenizerFactory t = new KoreanTokenizerFactory();
//t = new DefaultTokenizerFactory();
//t.setTokenPreProcessor(new CommonPreprocessor());
Word2Vec vec = new Word2Vec.Builder().minWordFrequency(1).iterations(5).learningRate(0.025).layerSize(150).seed(42).sampling(0).negativeSample(0).useHierarchicSoftmax(true).windowSize(5).modelUtils(new BasicModelUtils<VocabWord>()).useAdaGrad(false).iterate(iter).workers(8).allowParallelTokenization(true).tokenizerFactory(t).elementsLearningAlgorithm(new CBOW<VocabWord>()).build();
long time1 = System.currentTimeMillis();
vec.fit();
long time2 = System.currentTimeMillis();
log.info("Total execution time: {}", (time2 - time1));
}
use of org.junit.Ignore in project che by eclipse.
the class AssistQuickFixTest18 method _testConvertToAnonymousClassCreation7.
@Test
@Ignore
public // Bug 427694: [1.8][compiler] Functional interface not identified correctly
void _testConvertToAnonymousClassCreation7() throws Exception {
IPackageFragment pack1 = fSourceFolder.createPackageFragment("test1", false, null);
StringBuffer buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("interface I { Object m(Class c); }\n");
buf.append("interface J<S> { S m(Class<?> c); }\n");
buf.append("interface K<T> { T m(Class<?> c); }\n");
buf.append("interface Functional<S,T> extends I, J<S>, K<T> {}\n");
buf.append("\n");
buf.append("class C {\n");
buf.append(" Functional<?, ?> fun= (c) -> { return null;};\n");
buf.append("}\n");
ICompilationUnit cu = pack1.createCompilationUnit("C.java", buf.toString(), false, null);
int offset = buf.toString().indexOf("->");
AssistContext context = getCorrectionContext(cu, offset, 0);
assertNoErrors(context);
List proposals = collectAssists(context, false);
assertNumberOfProposals(proposals, 2);
assertCorrectLabels(proposals);
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("interface I { Object m(Class c); }\n");
buf.append("interface J<S> { S m(Class<?> c); }\n");
buf.append("interface K<T> { T m(Class<?> c); }\n");
buf.append("interface Functional<S,T> extends I, J<S>, K<T> {}\n");
buf.append("\n");
buf.append("class C {\n");
buf.append(" Functional<?, ?> fun= new Functional<Object, Object>() {\n");
buf.append(" @Override\n");
buf.append(" public Object m(Class c) {\n");
buf.append(" return null;\n");
buf.append(" }\n");
buf.append(" };\n");
buf.append("}\n");
String expected1 = buf.toString();
assertExpectedExistInProposals(proposals, new String[] { expected1 });
}
use of org.junit.Ignore in project che by eclipse.
the class ModifierCorrectionsQuickFixTest method testSuppressNLSWarningAnnotation1.
@Test
@Ignore
public void testSuppressNLSWarningAnnotation1() throws Exception {
Hashtable options = JavaCore.getOptions();
options.put(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL, JavaCore.WARNING);
JavaCore.setOptions(options);
IPackageFragment pack1 = fSourceFolder.createPackageFragment("test1", false, null);
StringBuffer buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("public class E {\n");
buf.append(" static {\n");
buf.append(" @SuppressWarnings(\"unused\") String str= \"foo\";");
buf.append(" }\n");
buf.append("}\n");
ICompilationUnit cu = pack1.createCompilationUnit("E.java", buf.toString(), false, null);
CompilationUnit astRoot = getASTRoot(cu);
ArrayList proposals = collectCorrections(cu, astRoot);
assertNumberOfProposals(proposals, 4);
assertCorrectLabels(proposals);
String[] expected = new String[2];
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("public class E {\n");
buf.append(" static {\n");
buf.append(" @SuppressWarnings({\"unused\", \"nls\"}) String str= \"foo\";");
buf.append(" }\n");
buf.append("}\n");
expected[0] = buf.toString();
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("@SuppressWarnings(\"nls\")\n");
buf.append("public class E {\n");
buf.append(" static {\n");
buf.append(" @SuppressWarnings(\"unused\") String str= \"foo\";");
buf.append(" }\n");
buf.append("}\n");
expected[1] = buf.toString();
assertExpectedExistInProposals(proposals, expected);
}
use of org.junit.Ignore in project che by eclipse.
the class UnresolvedTypesQuickFixTest method testAmbiguousTypeInSuperClass.
@Test
@Ignore
public void testAmbiguousTypeInSuperClass() throws Exception {
createSomeAmbiguity(false, false);
IPackageFragment pack1 = fSourceFolder.createPackageFragment("test1", false, null);
StringBuffer buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("import test2.*;\n");
buf.append("import test3.*;\n");
buf.append("public class E extends A {\n");
buf.append(" B b;\n");
buf.append(" C c;\n");
buf.append("}\n");
ICompilationUnit cu = pack1.createCompilationUnit("E.java", buf.toString(), false, null);
CompilationUnit astRoot = getASTRoot(cu);
ArrayList proposals = collectCorrections(cu, astRoot);
assertNumberOfProposals(proposals, 2);
assertCorrectLabels(proposals);
CUCorrectionProposal proposal = (CUCorrectionProposal) proposals.get(0);
String preview1 = getPreviewContent(proposal);
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("import test2.*;\n");
buf.append("import test2.A;\n");
buf.append("import test3.*;\n");
buf.append("public class E extends A {\n");
buf.append(" B b;\n");
buf.append(" C c;\n");
buf.append("}\n");
String expected1 = buf.toString();
proposal = (CUCorrectionProposal) proposals.get(1);
String preview2 = getPreviewContent(proposal);
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("import test2.*;\n");
buf.append("import test3.*;\n");
buf.append("import test3.A;\n");
buf.append("public class E extends A {\n");
buf.append(" B b;\n");
buf.append(" C c;\n");
buf.append("}\n");
String expected2 = buf.toString();
assertEqualStringsIgnoreOrder(new String[] { preview1, preview2 }, new String[] { expected1, expected2 });
}
use of org.junit.Ignore in project che by eclipse.
the class UnresolvedTypesQuickFixTest method testAmbiguousTypeInField.
@Test
@Ignore
public void testAmbiguousTypeInField() throws Exception {
createSomeAmbiguity(true, false);
IPackageFragment pack1 = fSourceFolder.createPackageFragment("test1", false, null);
StringBuffer buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("import test2.*;\n");
buf.append("import test3.*;\n");
buf.append("public class E {\n");
buf.append(" A a;\n");
buf.append(" B b;\n");
buf.append(" C c;\n");
buf.append("}\n");
ICompilationUnit cu = pack1.createCompilationUnit("E.java", buf.toString(), false, null);
CompilationUnit astRoot = getASTRoot(cu);
ArrayList proposals = collectCorrections(cu, astRoot);
assertNumberOfProposals(proposals, 2);
assertCorrectLabels(proposals);
CUCorrectionProposal proposal = (CUCorrectionProposal) proposals.get(0);
String preview1 = getPreviewContent(proposal);
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("import test2.*;\n");
buf.append("import test2.A;\n");
buf.append("import test3.*;\n");
buf.append("public class E {\n");
buf.append(" A a;\n");
buf.append(" B b;\n");
buf.append(" C c;\n");
buf.append("}\n");
String expected1 = buf.toString();
proposal = (CUCorrectionProposal) proposals.get(1);
String preview2 = getPreviewContent(proposal);
buf = new StringBuffer();
buf.append("package test1;\n");
buf.append("import test2.*;\n");
buf.append("import test3.*;\n");
buf.append("import test3.A;\n");
buf.append("public class E {\n");
buf.append(" A a;\n");
buf.append(" B b;\n");
buf.append(" C c;\n");
buf.append("}\n");
String expected2 = buf.toString();
assertEqualStringsIgnoreOrder(new String[] { preview1, preview2 }, new String[] { expected1, expected2 });
}
Aggregations