Commit f711c912 authored by matjaz's avatar matjaz
Browse files

LemmaGen: Four new widgets added for saving/loading objects to files,...

LemmaGen: Four new widgets added for saving/loading objects to files, reorganized into new categories & connected to new LATINO dlls build: based on latino ver. 9d91c3e (main change is empty vector support in cosine similarity)
parent b0b59abd
This diff is collapsed.
...@@ -31,6 +31,22 @@ def lemmagen_example_list_to_table(inputDict): ...@@ -31,6 +31,22 @@ def lemmagen_example_list_to_table(inputDict):
outputDict['table'] = execResultPy outputDict['table'] = execResultPy
return outputDict return outputDict
def lemmagen_save_lemmatizer(inputDict):
_lmtz = ToNetObj(inputDict['lmtz'])
execResult = LemmaSharpIntf.SaveLemmatizer(_lmtz)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['objString'] = execResultPy
return outputDict
def lemmagen_load_net_lemmatizer(inputDict):
_lmtzStr = ToString(inputDict['lmtzStr'])
execResult = LemmaSharpIntf.LoadNetLemmatizer(_lmtzStr)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['obj'] = execResultPy
return outputDict
def lemmagen_group_examples(inputDict): def lemmagen_group_examples(inputDict):
_exampleList = ToNetObj(inputDict['exampleList']) _exampleList = ToNetObj(inputDict['exampleList'])
_ignoreFrequencies = ToBool(inputDict['ignoreFrequencies']) _ignoreFrequencies = ToBool(inputDict['ignoreFrequencies'])
...@@ -196,3 +212,21 @@ def lemmagen_filter_list_elements(inputDict): ...@@ -196,3 +212,21 @@ def lemmagen_filter_list_elements(inputDict):
outputDict['listFiltered'] = execResultPy['listFiltered'] outputDict['listFiltered'] = execResultPy['listFiltered']
return outputDict return outputDict
def lemmagen_save_net_object(inputDict):
_serializableObject = ToNetObj(inputDict['serializableObject'])
_compress = ToBool(inputDict['compress'])
execResult = LemmaSharpIntf.SaveNetObject(_serializableObject, _compress)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['objString'] = execResultPy
return outputDict
def lemmagen_load_net_object(inputDict):
_serializableObjectStr = ToString(inputDict['serializableObjectStr'])
_compress = ToBool(inputDict['compress'])
execResult = LemmaSharpIntf.LoadNetObject(_serializableObjectStr, _compress)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['obj'] = execResultPy
return outputDict
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment