"Rwordseg in Execute R"

hmhsing
hmhsing Altair Community Member
edited November 5 in Community Q&A

I am trying to use Rwordseg in Chinese text mining. But it shows "Process failed. Script terminated abnormally."

The R script I put to execute is as follow, hope someone can help me to solve this problem, thanks.

rm_main = function(data)
{
library(Rwordseg)
data2<-as.data.table(segmentCN(data$Sentence))
return(data2)
}

 

 

Tagged:

Answers

  • Hugh_Zang
    Hugh_Zang New Altair Community Member

    Any other errorlog or tips?
    I try to use your code to run a bit, it is normal.
    Maybe you can describe your input dataset example?

  • hmhsing
    hmhsing Altair Community Member

    I use Read Excel operator. The excel file, which includes chinese words example, is imported through Import Configuration Wizard. The message from RapidMiner is in the following, thanks for your help. 


    Message: Script terminated abnormally.
    Exception: com.rapidminer.operator.OperatorException

    Stack trace:

    com.rapidminer.operator.scripting.AbstractScriptRunner.run(AbstractScriptRunner.java:162)

    com.rapidminer.operator.scripting.AbstractScriptingLanguageOperator.doWork(AbstractScriptingLanguageOperator.java:90)

    com.rapidminer.operator.scripting.r.RScriptingOperator.doWork(RScriptingOperator.java:73)

    com.rapidminer.operator.Operator.execute(Operator.java:1002)

    com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:76)

    com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:811)

    com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:806)

    java.security.AccessController.doPrivileged(Native Method)

    com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:806)

    com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:392)

    com.rapidminer.operator.Operator.execute(Operator.java:1002)

    com.rapidminer.Process.run(Process.java:1195)

    com.rapidminer.Process.run(Process.java:1091)

    com.rapidminer.Process.run(Process.java:1044)

    com.rapidminer.Process.run(Process.java:1039)

    com.rapidminer.Process.run(Process.java:1029)

    com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    Have you checked your encoding? Sometimes this can be an encoding issue from Excel which is piped through the process to the R Script.