Skip to content
Snippets Groups Projects
Commit 21e0a1e5 authored by Franck Dary's avatar Franck Dary
Browse files

Added a tool to predict morpho each feat at a time

parent 23c24a47
No related branches found
No related tags found
No related merge requests found
Showing
with 149 additions and 3 deletions
......@@ -46,13 +46,26 @@ if __name__ == "__main__" :
output.close()
elif nameCol == "MORPHO" :
output = open("morpho.as", 'w', encoding='utf-8')
output = open("morpho_whole.as", 'w', encoding='utf-8')
for line in open(colFile, "r", encoding='utf-8') :
striped = line.strip()
if len(striped) == 0 :
continue
print("WRITE b.0 MORPHO " + striped, file=output)
output.close()
output = open("morpho_parts.as", 'w', encoding='utf-8')
allParts = set()
for line in open(colFile, "r", encoding='utf-8') :
striped = line.strip()
if len(striped) == 0 :
continue
parts = striped.split('|')
for part in parts :
allParts.add(part)
for part in allParts :
print("ADD b.0 MORPHO " + part, file=output)
print("Default : NOTHING", file=output)
output.close()
elif nameCol == "LABEL" :
output = open("parser.as", 'w', encoding='utf-8')
......
File moved
File moved
File moved
Name : Morpho
Type : Prediction
Oracle : morpho
Feature Model : morpho.fm
Action Set : ../../data/morpho_parts.as
Topology : (500,RELU,0.3)
File moved
# Features classiques
# FORM
b.0#FORM.fasttext
b.1#FORM.fasttext
b.2#FORM.fasttext
b.-1#FORM.fasttext
b.-2#FORM.fasttext
# POS
b.1#POS
b.2#POS
b.0#POS
b.-1#POS
b.-2#POS
b.-3#POS
# MORPHO
b.0#MORPHO
b.-1#MORPHO
b.-2#MORPHO
# UPPERCASE
b.0#FORM.U
b.1#FORM.U
# LENGTH
b.0#FORM.LEN
# SUFFIXES
b.0#FORM.PART.-4.-4
b.0#FORM.PART.-3.-3
b.0#FORM.PART.-2.-2
b.0#FORM.PART.-1.-1
b.0#FORM.PART.0.0
b.0#FORM.PART.1.1
b.0#FORM.PART.2.2
b.0#FORM.PART.3.3
# ERROR CORRECTION
#b.1#POS
#b.1#MORPHO
#b.2#POS
#b.2#MORPHO
#b.3#POS
#b.3#MORPHO
#b.4#POS
#b.4#MORPHO
File moved
Name : Strategy
Type : Information
Oracle : strategy_morpho
Oracle : strategy_morpho_parts
Oracle Filename : none
File moved
File moved
Name : Morpho with error correction
Dicts : morpho.dicts
%CLASSIFIERS
strategy strategy.cla
morpho morpho.cla
error_morpho error_morpho.cla
%STATES
morpho morpho
strategy strategy
error_morpho error_morpho
%TRANSITIONS
morpho error_morpho *
error_morpho morpho BACK
error_morpho strategy *
strategy morpho *
EPSILON
BACK 1
BACK 2
BACK 3
BACK 4
Name : Error_Morpho
Type : Prediction
Oracle : none
Feature Model : error_morpho.fm
Action Set : error_morpho.as
Topology : M(500,RELU,0.3)
Batchsize : 10
# Features classiques
# FORM
#b.0#FORM.fasttext
#b.1#FORM.fasttext
#b.2#FORM.fasttext
#b.-1#FORM.fasttext
#b.-2#FORM.fasttext
# POS
b.0#POS
b.-1#POS
b.-2#POS
b.-3#POS
b.-4#POS
# MORPHO
b.0#MORPHO
b.-1#MORPHO
b.-2#MORPHO
b.-3#MORPHO
b.-4#MORPHO
# UPPERCASE
b.0#FORM.U
b.-1#FORM.U
b.-2#FORM.U
b.-3#FORM.U
b.-4#FORM.U
# LENGTH
b.0#FORM.LEN
b.-1#FORM.LEN
b.-2#FORM.LEN
b.-3#FORM.LEN
b.-4#FORM.LEN
Name : Morpho Machine
Dicts : morpho.dicts
%CLASSIFIERS
strategy strategy.cla
morpho morpho.cla
%STATES
morpho morpho
strategy strategy
%TRANSITIONS
morpho strategy *
strategy morpho *
......@@ -2,5 +2,5 @@ Name : Morpho
Type : Prediction
Oracle : morpho
Feature Model : morpho.fm
Action Set : ../../data/morpho.as
Action Set : ../../data/morpho_whole.as
Topology : (500,RELU,0.3)(100,RELU,0.0)
#Name Dimension Mode #
###################################
Morpho_bool 10 Embeddings
Morpho_int 10 Embeddings
Morpho_letters 30 Embeddings
Morpho_pos 30 Embeddings
Morpho_form 100 Embeddings
Morpho_morpho 30 Embeddings
Morpho_actions 30 Embeddings
# ERROR_MORPHO
Error_Morpho_actions 18 Embeddings _
Error_Morpho_bool 16 Embeddings _
Error_Morpho_int 16 Embeddings _
Error_Morpho_pos 18 Embeddings _
Error_Morpho_form 30 Embeddings _
Error_Morpho_letters 30 Embeddings _
Error_Morpho_morpho 22 Embeddings _
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment