How do I convert Strings to Vectors (Numerical Representation) and apply TF-IDF Vectorizer
Later Using RandomForeset Classifier Need to Train Model with the data in order to Classify the String weather it is True Positive or False Positive.
is there any possibility that it can be done in Knime
Hi @AlexanderFillbrunn thank you for the workflow
i am getting error as Execute failed: Cannot invoke “java.net.URL.getPath()” because “fileUrl” is null while converting String to Document
i checked the string to Document node i don’t see fileurl
also uninstalled Knime & re installed Knime
still same issue
@Ashok121 I think the links shows you the exercise - you might want to take a look at the solution. Maybe you also want to take the text mining course “[L4-TP] Introduction to Text Processing” or take a look at the slides.
@mlauber71 Thank you for the information
but I do see some bug in String to Document Node while I am converting String to Document, I am getting error as Cannot invoke “java.net.URL.getPath()” because “file URL.
Downloaded Entire Workflow still i am getting same Error as ERROR Strings To Document 3:119 Execute failed: Cannot invoke “java.net.URL.getPath()” because “fileUrl” is null
Hello @laaaarsi below is the Error info for String to document
2023-07-01 19:22:06,012 : ERROR : KNIME-Worker-49-Strings To Document 3:119 : : Node : Strings To Document : 3:119 : Execute failed: Cannot invoke “java.net.URL.getPath()” because “fileUrl” is null
java.lang.NullPointerException: Cannot invoke “java.net.URL.getPath()” because “fileUrl” is null
at org.knime.ext.textprocessing.TextprocessingCorePlugin.resolvePath(TextprocessingCorePlugin.java:122)
at org.knime.ext.textprocessing.util.OpenNlpModelPaths.getEnTokenizerModelFile(OpenNlpModelPaths.java:118)
at org.knime.ext.textprocessing.nodes.tokenization.tokenizer.word.OpenNlpEnglishWordTokenizer.(OpenNlpEnglishWordTokenizer.java:81)
at org.knime.ext.textprocessing.nodes.tokenization.tokenizer.word.OpenNlpEnglishWordTokenizerFactory.getTokenizer(OpenNlpEnglishWordTokenizerFactory.java:73)
at org.knime.ext.textprocessing.nodes.tokenization.TokenizerPool.(TokenizerPool.java:97)
at org.knime.ext.textprocessing.nodes.tokenization.DefaultTokenization.createTokenizerPool(DefaultTokenization.java:73)
at org.knime.ext.textprocessing.nodes.tokenization.DefaultTokenization.lambda$1(DefaultTokenization.java:92)
at java.base/java.util.HashMap.computeIfAbsent(Unknown Source)
at org.knime.ext.textprocessing.nodes.tokenization.DefaultTokenization.getWordTokenizer(DefaultTokenization.java:92)
at org.knime.ext.textprocessing.data.DocumentBuilder.(DocumentBuilder.java:135)
at org.knime.ext.textprocessing.nodes.transformation.stringstodocument.StringsToDocumentCellFactory2.getCells(StringsToDocumentCellFactory2.java:163)
at org.knime.core.data.container.RearrangeColumnsTable.calcNewCellsForRow(RearrangeColumnsTable.java:575)
at org.knime.core.data.container.RearrangeColumnsTable$ConcurrentNewColCalculator.compute(RearrangeColumnsTable.java:794)
at org.knime.core.data.container.RearrangeColumnsTable$ConcurrentNewColCalculator.compute(RearrangeColumnsTable.java:1)
at org.knime.core.util.MultiThreadWorker$ComputationTask$1.call(MultiThreadWorker.java:442)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:367)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:221)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
thanks for posting the KNIME Log! Could you try to uninstall the KNIME Text processing Extension and reinstall it or use a fresh installation of KNIME?