Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
retrain-semafor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
SENSEI
retrain-semafor
Commits
e0ccd606
Commit
e0ccd606
authored
10 years ago
by
Benoit Favre
Browse files
Options
Downloads
Patches
Plain Diff
fix parser models location
parent
d1337fbf
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
00-install-deps.sh
+5
-2
5 additions, 2 deletions
00-install-deps.sh
01-parse-data.sh
+12
-4
12 additions, 4 deletions
01-parse-data.sh
README
+22
-0
22 additions, 0 deletions
README
config.sh
+21
-3
21 additions, 3 deletions
config.sh
with
60 additions
and
9 deletions
00-install-deps.sh
+
5
−
2
View file @
e0ccd606
...
...
@@ -5,8 +5,11 @@
rm
-rf
deps/semafor
#git clone https://github.com/sammthomson/semafor.git deps/semafor
wget https://semafor-semantic-parser.googlecode.com/files/SEMAFOR-2.1.tgz
-O
SEMAFOR-2.1.tgz
tar
-C
deps
-xf
SEMAFOR-2.1.tgz
wget https://semafor-semantic-parser.googlecode.com/files/SEMAFOR-2.1.tgz
-O
deps/
SEMAFOR-2.1.tgz
tar
-C
deps
-xf
deps/
SEMAFOR-2.1.tgz
javac
-cp
${
classpath
}
$SEMAFOR_HOME
/edu/cmu/cs/lti/ark/fn/
{
identification,parsing
}
/
*
.java
# make sure macaon is installed
which maca_crf_barebones_decoder
which maca_graph_parser
This diff is collapsed.
Click to expand it.
01-parse-data.sh
+
12
−
4
View file @
e0ccd606
...
...
@@ -2,7 +2,15 @@
.
config.sh
python2 scripts/fulltext_to_elements.py
$framenet
/fulltext/
*
.xml
>
$fefile
.frame.elements
python2 scripts/fulltext_to_conll07.py
$framenet
/fulltext/
*
.xml
>
$fefile
.conll07
scripts/run-parser.sh
$fefile
.conll07
python2 scripts/conll07_to_tags.py <
$fefile
.conll07.parsed
>
$fefile
.all.lemma.tags
# convert framenet examples to the format understood by semafor (documented in docs/data-format-readme.txt)
/usr/bin/env python scripts/fulltext_to_elements.py
$framenet
/fulltext/
*
.xml
>
$fefile
.frame.elements
# convert framenet examples to the format understood by macaon
/usr/bin/env python scripts/fulltext_to_conll07.py
$framenet
/fulltext/
*
.xml
>
$fefile
.conll07
# run macaon tagger+parser
maca_crf_barebones_decoder
--conll07
$tagger_model
$tagger_dictionary
<
$fefile
.conll07
>
$fefile
.conll07.tagged
maca_graph_parser
-M
e
-C
en
-c
$fefile
.conll07.tagged
-m
$parser_model
.bin
-a
$parser_model
.alpha
-d
$parser_model
.dep_count
-x
-v
1
-z
$fefile
.conll07.parsed
# convert macaon output ot the format understood by semafor (documented in docs/data-format-readme.txt)
/usr/bin/env python scripts/conll07_to_tags.py <
$fefile
.conll07.parsed
>
$fefile
.all.lemma.tags
This diff is collapsed.
Click to expand it.
README
+
22
−
0
View file @
e0ccd606
Instructions for retraining semafor.
====================================
Benoit Favre <benoit.favre@lif.univ-mrs.fr>
inspired by http://www.ark.cs.cmu.edu/SEMAFOR/training/ and https://github.com/sammthomson/semafor/tree/master/training
1) First, edit the config.sh file in order to reflect your setup.
2) Make sure you have macaon installed and available in path, or change the 01-parse-data.sh script to use your own dependency parser
3) Run commands in that order
00-install-deps.sh
01-parse-data.sh
02-create-more-data-structures.sh
03-train-frame-identification.sh
04-train-argument-identification.sh
4) Brew lots of coffee because those commands are really long (~24h, 15G of disc)
models will be ready in data/idmodel.dat and data/argmodel.dat
This diff is collapsed.
Click to expand it.
config.sh
+
21
−
3
View file @
e0ccd606
#!/bin/bash
# make bash exit as soon as a command fails
set
-u
-e
-o
pipefail
# === to be modified ===
# location of framenet data in its original xml format
framenet
=
/storage/raid1/corpora/fndata-1.5
# location of javac/java
jhome
=
/usr/bin/
# location of macaon common/config files
export
MACAON_DIR
=
~benoit.favre/work/macaon/maca_data
# macaon parser model
parser_model
=
$MACAON_DIR
/en/maca_graph_parser/maca_graph_parser_model1_en
# macaon tagger model
tagger_model
=
$MACAON_DIR
/en/maca_crf_tagger/crf_tagger_model_en.bin
tagger_dictionary
=
$MACAON_DIR
/en/maca_crf_tagger/crf_tagger_wordtag_lexicon_en.bin
# === keep the following as is ===
SEMAFOR_HOME
=
$PWD
/deps/semafor-semantic-parser
classpath
=
${
SEMAFOR_HOME
}
/lib/semafor-deps.jar:
${
SEMAFOR_HOME
}
datadir
=
$PWD
/data
framenet
=
/storage/raid1/corpora/fndata-1.5
luxmldir
=
$framenet
/lu
jhome
=
/usr/bin/
fefile
=
${
datadir
}
/framenet
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