"[SOLVED] java.lang.nullPointerException in simple text mining script"
Hello, I'm new to text mining and rapidminer, but I'm following a tutorial in "Practical Text Mining" and cant make a very simple script work. The process fails and returns the java.lang.nullpointerexception error. I'm running Mac OsX 10.6.8, Java 13.7.2, Rapidminer 5.2.006.
I'm using the Read Excel operator to load a simple three-column spreadsheet. The columns are ID, Year, and Abstract. Abstract contains the text I'm trying to mine. I've flagged ID as the id field, and Abstract is flagged as text on the import wizard. There are 901 examples in the example set, and the Read Excel operator is working because I see my data when hovering over the output node. It also looks correct going into the Process Document from Data (PDFD) operator at the exa node.
On the PDFD operator, create word vector is checked (TF-IDF), as is keep text. PDFD contains a subprocess: Transform Case and Tokenize. I've removed all other operators from the program in order to isolate PDFD as the problem. When I hover over the output node of PDFD, it says Examples=0 but still shows my 3 attribute names.
Here is the xml code:
Bill
I'm using the Read Excel operator to load a simple three-column spreadsheet. The columns are ID, Year, and Abstract. Abstract contains the text I'm trying to mine. I've flagged ID as the id field, and Abstract is flagged as text on the import wizard. There are 901 examples in the example set, and the Read Excel operator is working because I see my data when hovering over the output node. It also looks correct going into the Process Document from Data (PDFD) operator at the exa node.
On the PDFD operator, create word vector is checked (TF-IDF), as is keep text. PDFD contains a subprocess: Transform Case and Tokenize. I've removed all other operators from the program in order to isolate PDFD as the problem. When I hover over the output node of PDFD, it says Examples=0 but still shows my 3 attribute names.
Here is the xml code:
Here is the stack trace:
<参数键= value =“imported_cell_range A1: E902"/>
<参数键= " prune_below_rank " value = " 0.05 " / >
Thanks in advance for any help you can offer!
Stack trace:
------------
Exception: java.lang.NullPointerException
Message: null
Stack trace:
com.rapidminer.operator.nio.model.ExcelResultSetConfiguration.makeDataResultSet(ExcelResultSetConfiguration.java:275)
com.rapidminer.operator.nio.model.AbstractDataResultSetReader.createExampleSet(AbstractDataResultSetReader.java:127)
com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:52)
com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:36)
com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:123)
com.rapidminer.operator.Operator.execute(Operator.java:834)
com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:379)
com.rapidminer.operator.Operator.execute(Operator.java:834)
com.rapidminer.Process.run(Process.java:925)
com.rapidminer.Process.run(Process.java:848)
com.rapidminer.Process.run(Process.java:807)
com.rapidminer.Process.run(Process.java:802)
com.rapidminer.Process.run(Process.java:792)
com.rapidminer.gui.ProcessThread.run(ProcessThread.java:63)
Bill
Tagged:
0
Answers
there was indeed a bug involved, should be fixed in the next release.
Regards,
Marco
NullPointerException is aRuntimeException。运行时异常,不能ca至关重要ught at compile time. They crash the program at run time if they are not handled properly. When a class is instantiated, its object is stored in computer memory. TheNullPointerExceptionsoccur when you try to use a reference that points to no location in memory (null) as though it were referencing an object. These include:
Balmer
I had the same problem (RapidMiner 6.5.2). Because I use some attributes and it's confusing to have no names, I just tried to import csv excelsheets and it works (slowly) but without errors.
Cheers,
ME. Taillefer