Orange Forum • View topic - Text mining in orange on mac

Text mining in orange on mac

A place to ask questions about methods in Orange and how they are used and other general support.

Text mining in orange on mac

Postby dcw0002 » Fri Jan 25, 2013 0:35

I have uploaded a .txt file and would like to get word n-gram information from this data set, however I get this in the output window of the word n-gram widget. Someone please help!!!

There were problems importing the following widgets:
OWC45Tree: c45 is not found
OWItemsetViz: No module named OWNetworkCanvas
OWRScript: No module named rpy2.robjects
OWLinProj3D: No module named OpenGL
OWNxExplorer3D: No module named OWNxExplorerQt
OWScatterPlot3D: No module named OpenGL
OWSphereviz3D: No module named OpenGL
(2, 'No such file or directory')
OWGeneMania: 'module' object has no attribute 'network'
OWANOVA: 'module' object has no attribute 'Orange'
OWApproxProfiles: 'module' object has no attribute 'Orange'
OWDataDistance: No module named qt
OWDataFiles: 'module' object has no attribute 'Orange'
OWDataFilesSave: 'module' object has no attribute 'Orange'
OWDataFilesSelector: 'module' object has no attribute 'Orange'
OWEpistasisAnalysis: 'module' object has no attribute 'Orange'
OWExampleSelector: No module named qttable
OWHypTest: No module named qt
OWImputeProfiles: 'module' object has no attribute 'Orange'
OWNormalize: No module named numpyExtn
OWProcessChipData: 'module' object has no attribute 'Orange'
The following widgets could not be imported and will not be available: OWSphereviz3D, OWC45Tree, OWLinProj3D, OWGeneMania, OWNxExplorer3D, OWScatterPlot3D.
The following prototype widgets could not be imported and will not be available: OWItemsetViz, OWImputeProfiles, OWDataFilesSave, OWExampleSelector, OWRScript, OWANOVA, OWApproxProfiles, OWDataFiles, OWProcessChipData, OWDataFilesSelector, OWHypTest, OWEpistasisAnalysis, OWDataDistance, OWNormalize.

Unhandled exception of type AttributeError occured at 14:43:20:
Traceback:
File: orngView.py, line 95 in helpOnActiveWidget
Code: widget.instance.openWidgetHelp()
File: OWBaseWidget.py, line 776 in openWidgetHelp
Code: qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True)
File: orngHelp.py, line 33 in showHelpFor
Code: helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/")
File: posixpath.py, line 68 in join
Code: elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Unhandled exception of type AttributeError occured at 14:47:03:
Traceback:
File: orngView.py, line 95 in helpOnActiveWidget
Code: widget.instance.openWidgetHelp()
File: OWBaseWidget.py, line 776 in openWidgetHelp
Code: qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True)
File: orngHelp.py, line 33 in showHelpFor
Code: helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/")
File: posixpath.py, line 68 in join
Code: elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Unhandled exception of type AttributeError occured at 15:09:41:
Traceback:
File: orngView.py, line 95 in helpOnActiveWidget
Code: widget.instance.openWidgetHelp()
File: OWBaseWidget.py, line 776 in openWidgetHelp
Code: qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True)
File: orngHelp.py, line 33 in showHelpFor
Code: helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/")
File: posixpath.py, line 68 in join
Code: elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Unhandled exception of type AttributeError occured at 17:27:43:
Traceback:
File: orngView.py, line 95 in helpOnActiveWidget
Code: widget.instance.openWidgetHelp()
File: OWBaseWidget.py, line 776 in openWidgetHelp
Code: qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True)
File: orngHelp.py, line 33 in showHelpFor
Code: helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/")
File: posixpath.py, line 68 in join
Code: elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Unhandled exception of type AttributeError occured at 17:33:16:
Traceback:
File: orngView.py, line 95 in helpOnActiveWidget
Code: widget.instance.openWidgetHelp()
File: OWBaseWidget.py, line 776 in openWidgetHelp
Code: qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True)
File: orngHelp.py, line 33 in showHelpFor
Code: helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/")
File: posixpath.py, line 68 in join
Code: elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Unhandled exception of type AttributeError occured at 17:38:26:
Traceback:
File: orngView.py, line 95 in helpOnActiveWidget
Code: widget.instance.openWidgetHelp()
File: OWBaseWidget.py, line 776 in openWidgetHelp
Code: qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True)
File: orngHelp.py, line 33 in showHelpFor
Code: helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/")
File: posixpath.py, line 68 in join
Code: elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Re: Text mining in orange on mac

Postby dhofmann » Tue Apr 23, 2013 13:41

Hi I do have a similar problem, but with the windows version. I use the following visual workflow.

File (.txt Tabstopp file converted from .xls) --> Select Attributes --> Preprocess --> Word n-Grams

This prints the following error:

Unhandled exception of type TypeError occured at 14:30:28:
Traceback:
File: OWWordNgram.py, line 118 in apply
Code: newdata = orngText.extractWordNGram(self.data, n = self.size + 2, stopwords = self.stopwords, threshold = self.threshold, measure = self.measureDict[self.measure])
File: orngText.py, line 991 in extractWordNGram
Code: phrases = p.split(ex['text'].value.decode('utf-8','ignore').encode('cp1250','ignore'))
TypeError: invalid arguments or unknown attribute name


When connecting Letter n-Grams instead of Word n-GramsI do get results.

I use version 2.6.1 with the text mining plugin.
Any ideas?

Re: Text mining in orange on mac

Postby Ales » Mon Apr 29, 2013 10:15

It seems the 'extractWordNGram' function in the orngText module expects the source text for each example instance row to be contained in a feature named 'text'. This seems to be hardcoded.

You can rename features using the Edit Domain widget


Return to Questions & Support



cron