Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
macaon_data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Dary
macaon_data
Commits
6607f37a
Commit
6607f37a
authored
4 years ago
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
updated tagparser_seq for new strategy
parent
d7f6d0b5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
UD_any/data/Makefile
+2
-2
2 additions, 2 deletions
UD_any/data/Makefile
UD_any/data/getTransitionSets.py
+0
-20
0 additions, 20 deletions
UD_any/data/getTransitionSets.py
UD_any/tagparser_seq/machine.rm
+17
-11
17 additions, 11 deletions
UD_any/tagparser_seq/machine.rm
with
19 additions
and
33 deletions
UD_any/data/Makefile
+
2
−
2
View file @
6607f37a
...
...
@@ -37,14 +37,14 @@ tokenizer.ts: all_no_test.conllu $(MCD)
segmenter.ts
:
echo
"EOS b.0"
>
$@
echo
"REWRITE b.0 EOS _"
>>
$@
echo
"NOTHING"
>>
$@
sed
-i
-e
's/^/<segmenter> /'
$@
columns
:
all_no_test.conllu $(MCD)
for
number
in
1 2 3 4 5 6 7 8 9 10
;
do
\
cat
all_no_test.conllu |
sed
'/^#/ d'
|
cut
-f
$$
number |
sort
--unique
>
col_
$$
number.txt
;
\
done
./getTransitionSets.py
$(
MCD
)
col_
*
\.
txt
cat
tagger.ts parser.ts
>
taggerparser.ts
texts
:
./getRawText.py
$(
CONLL2TXT
)
$(
TRAIN_FILES
)
$(
DEV_FILES
)
$(
TEST_FILES
)
...
...
This diff is collapsed.
Click to expand it.
UD_any/data/getTransitionSets.py
+
0
−
20
View file @
6607f37a
...
...
@@ -70,25 +70,6 @@ if __name__ == "__main__" :
output
.
close
()
elif
nameCol
==
"
DEPREL
"
:
output
=
open
(
"
parser_legacy.ts
"
,
'
w
'
,
encoding
=
'
utf-8
'
)
print
(
"
REDUCE
"
,
file
=
output
)
labels
=
set
()
labelsList
=
[]
for
line
in
open
(
colFile
,
"
r
"
,
encoding
=
'
utf-8
'
)
:
striped
=
line
.
strip
()
if
len
(
striped
)
==
0
or
striped
==
"
root
"
or
striped
==
"
_
"
:
continue
label
=
striped
.
split
(
'
:
'
)[
0
]
if
label
not
in
labels
:
labels
.
add
(
striped
)
labelsList
.
append
(
striped
)
labelsList
.
sort
()
for
label
in
labelsList
:
print
(
"
LEFT
"
+
label
,
file
=
output
)
print
(
"
RIGHT
"
+
label
,
file
=
output
)
print
(
"
EOS s.0
"
,
file
=
output
)
print
(
"
SHIFT
"
,
file
=
output
)
output
.
close
()
output
=
open
(
"
parser.ts
"
,
'
w
'
,
encoding
=
'
utf-8
'
)
print
(
"
<parser> REDUCE
"
,
file
=
output
)
labels
=
set
()
...
...
@@ -105,7 +86,6 @@ if __name__ == "__main__" :
for
label
in
labelsList
:
print
(
"
<parser> LEFT
"
+
label
,
file
=
output
)
print
(
"
<parser> RIGHT
"
+
label
,
file
=
output
)
print
(
"
<parser> EOS
"
,
file
=
output
)
print
(
"
<parser> SHIFT
"
,
file
=
output
)
output
.
close
()
This diff is collapsed.
Click to expand it.
UD_any/tagparser_seq/machine.rm
+
17
−
11
View file @
6607f37a
Name : Tagger, Feats
and Parser
Machine
Classifier : tag
morpho
Name : Tagger, Feats
, Parser and Segmenter sequential
Machine
Classifier : tag
parser
{
Transitions : {tagger,data/tagger.ts morpho,data/morpho_parts.ts parser,data/parser.ts}
Transitions : {tagger,data/tagger.ts morpho,data/morpho_parts.ts parser,data/parser.ts
segmenter,data/segmenter.ts
}
Network type : Modular
StateName : States{tagger morpho parser} Out{128}
StateName : States{tagger morpho parser
segmenter
} Out{128}
Context : Buffer{-3 -2 -1 0 1 2} Stack{} Columns{FORM UPOS} GRU{1 1 0 1} In{64} Out{128}
Focused : Column{ID} NbElem{1} Buffer{-1 0 1 2} Stack{2 1 0} GRU{1 1 0 1} In{64} Out{128}
Focused : Column{FORM} NbElem{10} Buffer{-1 0 1 2} Stack{2 1 0} GRU{1 1 0 1} In{64} Out{128}
...
...
@@ -17,10 +17,16 @@ Classifier : tagmorpho
Optimizer : Adam {0.0002 0.9 0.999 0.00000001 0.00001 true}
}
Predictions : UPOS FEATS HEAD DEPREL EOS
Strategy : sequential
tagger morpho 1
morpho parser NOTHING 1
morpho parser 0
parser tagger SHIFT 1
parser tagger RIGHT 1
parser tagger 0
Strategy
{
Block : End{cannotMove}
tagger tagger * 1
Block : End{cannotMove}
morpho morpho NOTHING 1
morpho morpho * 0
Block : End{cannotMove}
parser segmenter SHIFT 0
parser segmenter RIGHT 0
parser parser * 0
segmenter parser * 1
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment