Open maxkleiner opened 7 years ago
like in python import pydotplus
try: from StringIO import StringIO except ImportError: from io import StringIO
tree.export_graphviz( classifier, out_file='maxtree.dot', feature_names=vectorizer.get_feature_names(), )
dotfile = StringIO() tree.export_graphviz(classifier, out_file=dotfile) graph=pydotplus.graph_from_dot_data(dotfile.getvalue()) graph.write_png("sentimentdtree2.png")
the stringadapter in class TStrings is missing, but the Class IStringsAdapter existst: RegisterMethod('Function GetEnumerator : TStringsEnumerator'); RegisterProperty('StringsAdapter', 'IStringsAdapter', iptrw); the same goes with TStringsEnumerator