Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1501 commits
Select commit Hold shift + click to select a range
4f96f30
fixing precison and recall code
ShraddhaThumsi Sep 8, 2019
d16ba73
fixing precison and recall code
ShraddhaThumsi Sep 8, 2019
6c8d68e
fixing precison and recall code
ShraddhaThumsi Sep 8, 2019
1d955f0
fixing precison and recall code
ShraddhaThumsi Sep 9, 2019
e8c16ce
fixing precison and recall code
ShraddhaThumsi Sep 9, 2019
022b96f
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
f7390dd
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
8c9a1c3
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
b6f0003
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
7946b84
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
0b0f35a
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
a50f53f
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
5237f82
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
9bceb54
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 9, 2019
1f31b88
possibly there were stray rows in a given directory, because of which…
ShraddhaThumsi Sep 14, 2019
326cb3c
Refactoring code to get ready to merge to master
ShraddhaThumsi Sep 16, 2019
3076d28
removing stray print statements
ShraddhaThumsi Sep 16, 2019
21372b9
removing stray print statements
ShraddhaThumsi Sep 16, 2019
c603b65
removing stray print statements
ShraddhaThumsi Sep 16, 2019
1e2b39a
trying master branch way of writing root directory
ShraddhaThumsi Sep 17, 2019
d5642d3
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
283b77e
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
83f8fdb
Merge branch 'SVMContextEngine' of https://github.com/clulab/reach in…
Sep 17, 2019
b171fa4
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
2c64ee5
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
2e81457
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
5f44311
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
961f54b
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
403c795
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
49c6e48
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
bbcb249
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
3b89f0a
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
9a79129
starting code with events file instead of annotations
ShraddhaThumsi Sep 17, 2019
2fe3d85
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
960a987
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
58dc514
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
131da0a
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
71ca28b
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
b03203b
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
6cde771
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
d59e51e
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
0e74192
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
51e12a9
starting code with events file along with dataframe annotations
ShraddhaThumsi Sep 17, 2019
ca48e91
changed event matching criteria
ShraddhaThumsi Sep 17, 2019
9d9ddd1
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
5ae9b60
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
f254665
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
1cdfd3e
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
c0db085
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
e5aa127
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
560da47
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
d1f9dad
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
7f5bbe9
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
be59db3
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
9b1f507
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
37e4fff
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
8f2ba72
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
553f907
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
d7d2cba
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
1ed2198
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
1e0ca74
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
49c59b3
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
2d3464a
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
9bae3e9
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
c9769cc
fixing meta character issue
ShraddhaThumsi Sep 17, 2019
8fb203e
need to check key format in label map
ShraddhaThumsi Sep 17, 2019
d3f4d12
need to check key format in label map
ShraddhaThumsi Sep 17, 2019
cb9e93e
need to check key format in label map
ShraddhaThumsi Sep 17, 2019
eba2784
need to check key format in label map
ShraddhaThumsi Sep 18, 2019
6851bef
need to check key format in label map
ShraddhaThumsi Sep 18, 2019
2dee114
changing old dataframe to match new event IDs
ShraddhaThumsi Sep 18, 2019
766b2ef
changing old dataframe to match new event IDs
ShraddhaThumsi Sep 18, 2019
0d7f1ea
changing old dataframe to match new event IDs
ShraddhaThumsi Sep 18, 2019
0d9c273
changing old dataframe to match new event IDs
ShraddhaThumsi Sep 18, 2019
6221850
changing old dataframe to match new event IDs
ShraddhaThumsi Sep 18, 2019
9d5c501
I have added the code that widens the event interval of an annotation…
ShraddhaThumsi Sep 18, 2019
b077754
I have added the code that widens the event interval of an annotation…
ShraddhaThumsi Sep 18, 2019
730f21b
I have added the code that widens the event interval of an annotation…
ShraddhaThumsi Sep 18, 2019
59572a8
I have added the code that widens the event interval of an annotation…
ShraddhaThumsi Sep 18, 2019
bf84aba
debugging event matching function
ShraddhaThumsi Sep 18, 2019
3730580
reordering labels to get only those from the current paper
ShraddhaThumsi Sep 18, 2019
ba7d906
reordering labels to get only those from the current paper
ShraddhaThumsi Sep 18, 2019
aee8ac2
reordering labels to get only those from the current paper
ShraddhaThumsi Sep 18, 2019
8f98e6b
reordering labels to get only those from the current paper
ShraddhaThumsi Sep 18, 2019
6d897da
reordering labels to get only those from the current paper
ShraddhaThumsi Sep 18, 2019
7259b35
Reorganizing resource dir to take relative path
ShraddhaThumsi Sep 18, 2019
6dea462
Merge branch 'SVMContextEngine' of https://github.com/clulab/reach in…
Sep 18, 2019
fed0fcf
removing unnecessary resource files and refreshing the copy of my tra…
Sep 18, 2019
17f9b0b
all tests seem to have passed on Travis. I have added a few comments …
ShraddhaThumsi Sep 18, 2019
1aaf2a4
I have removed logger.info from ReachSystem.
ShraddhaThumsi Sep 18, 2019
3c9cdc6
just pushing ReachSystem with logger.info to ensure I didn't break an…
ShraddhaThumsi Sep 18, 2019
a4bbe13
staging some major commenting and renaming of paths. I want to run it…
ShraddhaThumsi Sep 18, 2019
48cb479
updated the code for TestSVM to use the correct config variables. Als…
ShraddhaThumsi Sep 18, 2019
01865fb
updated the code for TestSVM to use the correct config variables. Als…
ShraddhaThumsi Sep 18, 2019
25ff139
Update .travis.yml
enoriega Sep 18, 2019
2a1d372
Second iteration improvements based on Enrique's feedback include:
ShraddhaThumsi Sep 18, 2019
d02b0f6
Second iteration improvements based on Enrique's feedback include:
ShraddhaThumsi Sep 18, 2019
fae5fca
switching to sub-branch to fix file reading as resource
ShraddhaThumsi Sep 18, 2019
8da9894
switching to sub-branch to fix file reading as resource
ShraddhaThumsi Sep 18, 2019
a24a749
switching to sub-branch to fix file reading as resource
ShraddhaThumsi Sep 18, 2019
76bf1ba
switching to sub-branch to fix file reading as resource
ShraddhaThumsi Sep 18, 2019
86bdba6
switching to sub-branch to fix file reading as resource
ShraddhaThumsi Sep 18, 2019
9072932
trying to read file as getResource from mkyong.
ShraddhaThumsi Sep 18, 2019
8bfa25d
trying to read file as getResource from mkyong.
ShraddhaThumsi Sep 18, 2019
91ef5b7
trying to specify encoding for fromURL function
ShraddhaThumsi Sep 18, 2019
0ce3a6b
trying to specify encoding for fromURL function
ShraddhaThumsi Sep 18, 2019
10de06f
possibly the function reads from the wrong path, so we'll find out if…
ShraddhaThumsi Sep 18, 2019
4bcbd51
possibly the function reads from the wrong path, so we'll find out if…
ShraddhaThumsi Sep 18, 2019
93e6125
possibly the function reads from the wrong path, so we'll find out if…
ShraddhaThumsi Sep 18, 2019
82183e8
possibly the function reads from the wrong path, so we'll find out if…
ShraddhaThumsi Sep 18, 2019
acce5e0
still working on resource directory
ShraddhaThumsi Sep 19, 2019
77c620f
trying a different way
ShraddhaThumsi Sep 19, 2019
fd2d646
trying a different way
ShraddhaThumsi Sep 19, 2019
2524b4e
trying a different way
ShraddhaThumsi Sep 19, 2019
d034155
trying a different way
ShraddhaThumsi Sep 19, 2019
37ca30d
trying a different way
ShraddhaThumsi Sep 19, 2019
a09d7ef
getResource now works, thanks to David. I will now try to load the SV…
ShraddhaThumsi Sep 19, 2019
d50a0c1
getResource now works, thanks to David. I will now try to load the SV…
ShraddhaThumsi Sep 19, 2019
c9f88be
getResource now works, thanks to David. I will now try to load the SV…
ShraddhaThumsi Sep 19, 2019
813431c
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
3f94280
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
2a6c4db
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
7ddc1ef
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
9c361e4
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
2fe4adc
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
bc083e1
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
6e358b6
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
7ee00c6
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
691f8a3
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
ae5dcfe
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
74cb6bd
Reading files as resources seems to be a bit erratic and unpredictable.
ShraddhaThumsi Sep 19, 2019
0a8d394
I am now passing a URL of the file to the loadFrom function.
ShraddhaThumsi Sep 19, 2019
fcf2d5f
pushing latest copy of svm model
Sep 19, 2019
3e7eed8
I am now passing a URL of the file to the loadFrom function.
ShraddhaThumsi Sep 19, 2019
fe60f38
The code on FixToResources worked for SVMContextEngine, so I'm now ad…
ShraddhaThumsi Sep 19, 2019
8dc8651
changed code in FeatureExtractor and ContextPairInstance to incorpora…
ShraddhaThumsi Sep 19, 2019
f03c215
final push to merge file reading with SVMContextEngine. This push mer…
ShraddhaThumsi Sep 19, 2019
6c4af9d
restores ignoreSections to a non-empty list
ShraddhaThumsi Sep 19, 2019
57a7034
checking if tests pass if ruleBasedEngine is used
ShraddhaThumsi Sep 19, 2019
c44be3b
checking if tests pass if ruleBasedEngine is used
ShraddhaThumsi Sep 19, 2019
ef8067f
checking if tests pass if ruleBasedEngine is used
ShraddhaThumsi Sep 19, 2019
d67b5d0
checking if tests pass if ruleBasedEngine is used
ShraddhaThumsi Sep 19, 2019
2b3b6bb
checking if tests pass if ruleBasedEngine is used
ShraddhaThumsi Sep 19, 2019
94117b4
checking if tests pass if ruleBasedEngine is used. Adding check to se…
ShraddhaThumsi Sep 19, 2019
3cd05c5
checking if tests pass if ruleBasedEngine is used. Adding check to se…
ShraddhaThumsi Sep 19, 2019
c4d67e5
added condition to SVM like that in Policy4. This condition checks if…
ShraddhaThumsi Sep 19, 2019
05f2de5
added condition to SVM like that in Policy4. This condition checks if…
ShraddhaThumsi Sep 19, 2019
f0739b3
adding code to check values of grounding in SVM.
ShraddhaThumsi Sep 19, 2019
bd02c5f
adding code to check values of grounding in SVM.
ShraddhaThumsi Sep 19, 2019
bc6179c
adding code to check values of grounding in SVM.
ShraddhaThumsi Sep 19, 2019
c49b631
SVM does not seem to recognize mouse and rice, but it seems to know w…
ShraddhaThumsi Sep 19, 2019
4bd7f48
double-checking to see tests pass on Policy4
ShraddhaThumsi Sep 19, 2019
87ddf43
double-checking to see tests pass on Policy4
ShraddhaThumsi Sep 19, 2019
30961a7
double-checking to see tests pass on Policy4
ShraddhaThumsi Sep 19, 2019
f3776b1
double-checking to see tests pass on Policy4
ShraddhaThumsi Sep 19, 2019
cb40738
made all changes in application.conf. Code is ready for review.
ShraddhaThumsi Sep 19, 2019
0c53610
made all changes in application.conf. Code is ready for review.
ShraddhaThumsi Sep 20, 2019
8ed499c
Restored .travis.yml from master
enoriega Sep 20, 2019
15187aa
Restored runAllTests.sh from master
enoriega Sep 20, 2019
9970b69
starting new iteration to merge. In this push, I have renamed the pac…
ShraddhaThumsi Sep 20, 2019
fe70c32
refactoring code to prepare SVM training script
ShraddhaThumsi Sep 20, 2019
675f968
imports in TrainSVMInstance need to be resolved
ShraddhaThumsi Sep 20, 2019
ab665b2
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
b53f98d
imports in TrainSVMInstance need to be resolved
ShraddhaThumsi Sep 20, 2019
d69fe57
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
3a38681
imports in TrainSVMInstance need to be resolved
ShraddhaThumsi Sep 20, 2019
879c392
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
f2d5540
imports in TrainSVMInstance need to be resolved
ShraddhaThumsi Sep 20, 2019
961b61e
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
5237a68
Uncommented and optimized imports to TrainSVMModel
ShraddhaThumsi Sep 20, 2019
d5c1395
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
3e2e9be
Uncommented and optimized imports to TrainSVMModel
ShraddhaThumsi Sep 20, 2019
3ff8abc
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
de9ad8b
Uncommented and optimized imports to TrainSVMModel
ShraddhaThumsi Sep 20, 2019
29008cc
starter code for tests
ShraddhaThumsi Sep 20, 2019
e1cf984
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 20, 2019
ff067f8
starter code for tests
ShraddhaThumsi Sep 21, 2019
7672154
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 21, 2019
e940088
starter code for tests
ShraddhaThumsi Sep 21, 2019
89ed08d
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 21, 2019
eae0e13
starter code for tests
ShraddhaThumsi Sep 21, 2019
5d6f889
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
Sep 21, 2019
77e7533
checking values of features for tests
ShraddhaThumsi Sep 21, 2019
11c2edc
checking values of features for tests
ShraddhaThumsi Sep 21, 2019
481ab3a
checking values of features for tests
ShraddhaThumsi Sep 21, 2019
abacc63
checking values of features for tests
ShraddhaThumsi Sep 21, 2019
ccd9b41
adding files for test
Sep 21, 2019
c07e5be
Merge branch 'Shraddha_Thumsi' of https://github.com/clulab/reach int…
ShraddhaThumsi Sep 21, 2019
514d6df
Merge branch 'SVMContextEngine' of https://github.com/clulab/reach in…
ShraddhaThumsi Sep 21, 2019
6dafb28
Merge branch 'CompleteTestSVM' of https://github.com/clulab/reach int…
ShraddhaThumsi Sep 21, 2019
c6d15c5
adding tests after merge conflict
ShraddhaThumsi Sep 21, 2019
80a0706
added basic tests
ShraddhaThumsi Sep 21, 2019
29507e4
adding svm model for tests
ShraddhaThumsi Sep 21, 2019
e6aa160
fixing path to svm
ShraddhaThumsi Sep 21, 2019
ebf0905
fixing feature names
ShraddhaThumsi Sep 21, 2019
d6e2810
added tests to TestSVMContext, getting ready to merge.
ShraddhaThumsi Sep 21, 2019
55e9c26
added tests to TestSVMContext, getting ready to merge.
ShraddhaThumsi Sep 21, 2019
c256aef
removed unnecessary rows
ShraddhaThumsi Sep 21, 2019
073ec92
removed unnecessary rows
ShraddhaThumsi Sep 21, 2019
0c30d30
removed unnecessary rows
ShraddhaThumsi Sep 21, 2019
eb62717
removed unnecessary rows
ShraddhaThumsi Sep 21, 2019
e7ecf08
removed unnecessary rows
ShraddhaThumsi Sep 21, 2019
7259d8d
removed unnecessary script that got accidentally left over
ShraddhaThumsi Sep 21, 2019
c7e0593
changing overridden fit function from empty function body to fitting …
ShraddhaThumsi Sep 21, 2019
6551108
changing overridden fit function from empty function body to fitting …
ShraddhaThumsi Sep 21, 2019
8051e3f
removing stray prints and IOs
ShraddhaThumsi Sep 21, 2019
dfd1211
removing stray prints and IOs
ShraddhaThumsi Sep 21, 2019
2c707f8
Added a test for loading a reach system with SVMPolicy
enoriega Sep 21, 2019
2ea569b
changed Train script to take command line arguments
ShraddhaThumsi Sep 21, 2019
307b63c
added the skeleton of the tests, I need to run the script from comman…
ShraddhaThumsi Sep 21, 2019
e6439d7
added the skeleton of the tests, I need to run the script from comman…
ShraddhaThumsi Sep 21, 2019
eca2746
added two tests: 1 to check for illegal argument exception, and 1 to …
ShraddhaThumsi Sep 21, 2019
2a3c877
added two tests: 1 to check for illegal argument exception, and 1 to …
ShraddhaThumsi Sep 21, 2019
c26208c
there seems to be some error in the shell scripting code becasuse of …
ShraddhaThumsi Sep 21, 2019
4e5e8a9
first test needs fixing, checking if the second one passes
ShraddhaThumsi Sep 21, 2019
543899e
working on null pointer
ShraddhaThumsi Sep 21, 2019
5450419
testing 2nd test
ShraddhaThumsi Sep 21, 2019
089dcd1
testing 2nd test
ShraddhaThumsi Sep 21, 2019
bce8cff
testing 2nd test
ShraddhaThumsi Sep 21, 2019
0c343f3
trying to run shell script using .! and Seq()
ShraddhaThumsi Sep 22, 2019
bdf4f7b
trying to run shell script using .! and Seq(). That looks promising, …
ShraddhaThumsi Sep 22, 2019
57dfb61
trying to fix second test with .!!. Will come back to file not found …
ShraddhaThumsi Sep 22, 2019
1f78e82
resolving runtime error on test 2 by similar Seq(commands).!
ShraddhaThumsi Sep 22, 2019
79cba6a
resolving runtime error on test 2 by similar Seq(commands).!
ShraddhaThumsi Sep 22, 2019
01c9560
trying with linestream instead of .!
ShraddhaThumsi Sep 22, 2019
b654a22
trying with linestream instead of .!
ShraddhaThumsi Sep 22, 2019
b9c79d8
trying with linestream instead of .!
ShraddhaThumsi Sep 22, 2019
58ec6ed
trying with linestream instead of .!
ShraddhaThumsi Sep 22, 2019
64bde1c
trying again with Seq(a).!
ShraddhaThumsi Sep 22, 2019
8cccf93
trying again with Seq(a).!. a simple test with proper spacing worked,…
ShraddhaThumsi Sep 22, 2019
a1c13c1
trying again with Seq(a).!. a simple test with proper spacing worked,…
ShraddhaThumsi Sep 22, 2019
3cdfebe
trying again with Seq(a).!. a simple test with proper spacing worked,…
ShraddhaThumsi Sep 22, 2019
67c71c0
test 2 now passes, so trying spacing in test 1
ShraddhaThumsi Sep 22, 2019
dec69d7
test 2 now passes, so trying spacing in test 1
ShraddhaThumsi Sep 22, 2019
463c36f
trying to call the singleton of TrainSVM directly into the test
ShraddhaThumsi Sep 22, 2019
3014ad0
trying to call the singleton of TrainSVM directly into the test
ShraddhaThumsi Sep 22, 2019
5098962
trying to call the singleton of TrainSVM directly into the test
ShraddhaThumsi Sep 22, 2019
a075985
renamed some classes, functions and variables. Need to next test the …
ShraddhaThumsi Sep 23, 2019
219af92
added code to Training script to change from object to class, and als…
ShraddhaThumsi Sep 23, 2019
efa43fd
added code to call the instance of training script from the test and …
ShraddhaThumsi Sep 23, 2019
2391ebb
absolute path to the temp dir didn't work, so I will use the URL path…
ShraddhaThumsi Sep 23, 2019
d461e6a
inverting order in which I'm calling the instance
ShraddhaThumsi Sep 23, 2019
e4a1eeb
inverting order in which I'm calling the instance
ShraddhaThumsi Sep 23, 2019
9697939
inverting order in which I'm calling the instance
ShraddhaThumsi Sep 23, 2019
348f159
removed test to check for exception, since it doesn't add any extra c…
ShraddhaThumsi Sep 23, 2019
5c51a3d
added detailed comments on the usage of the script and cleaned up the…
ShraddhaThumsi Sep 23, 2019
cd1ca54
made modifications to all but log file as per Enrique's suggestions. …
ShraddhaThumsi Sep 24, 2019
3eea465
all suggestion by Enrique on changing build.sbt, application.conf etc…
ShraddhaThumsi Sep 24, 2019
3eac754
merging master into branch
cl4yton Mar 18, 2020
1183f46
Added README on how to use the TrainSVMClassifier script and how to c…
enoriega Mar 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ core/*.iml
.DS_Store
Makefile

output/*

vocab.txt
w2vvoc.txt
SavedLSTM_tag_20190806
Expand All @@ -17,7 +19,6 @@ SentencesInfo_all_label_final_ExactRecur_ExpandBound.txt
SentencesInfo_all_label_final_ExactRecur_ExpandBound_WideSubjObjBound.txt
SentencesInfo_all_label_final_ExactRecur_train.csv


# sbt specific
dist/*
target/
Expand Down
27 changes: 27 additions & 0 deletions SVM_CONTEXT_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Training

THE `SVMContextEngine` requires a model previously trained. To train the model from scratch the following files are required

To run this script, you will need the training dataset found at `main/src/main/resources/org/clulab/context/svmFeatures/grouped_features.csv.gz` expected to be a gziped csv file.
Also, a list of the features to be used for training, found as a comma-separated string in `main/src/main/resources/org/clulab/context/svmFeatures/specific_features.txt`

To train the model from scratch use the following script:

```
sbt 'runMain org.clulab.reach.context.svm_scripts.TrainSVMContextClassifier main/src/main/resources/org/clulab/context/svmFeatures/grouped_features.csv.gz main/src/main/resources/org/clulab/context/svmFeatures/svm_model.dat main/src/main/resources/org/clulab/context/svmFeatures/specific_features.txt'
```

## Usage Configuration

The context engine is governed by the `svmContextEngine` section of `application.conf`. To indicate REACH to use the SVMContextEngine, specify `SVMPolicy` type and specify the size of the sentence window in the `bound` parameter:

```
contextEngine{
type = SVMPolicy
params = {

bound = 3
}
}
```
The trained model *must* exist in the file `main/src/main/resources/org/clulab/context/svmFeatures/svm_model.dat`. This path is hardcoded and is not a parameter.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ site.includeScaladoc()

ghpages.settings

git.remoteRepo := "git@github.com:clulab/reach.git"
git.remoteRepo := "git@github.com:clulab/reach.git"
2 changes: 1 addition & 1 deletion main/build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name := "reach-main"

libraryDependencies ++= {
val akkaV = "2.5.4"
val luceVer = "5.3.1"
val procVer = "7.5.3"


Seq(
"ai.lum" %% "nxmlreader" % "0.0.9",
"commons-io" % "commons-io" % "2.4",
Expand Down
24 changes: 18 additions & 6 deletions main/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ bratDir = ${rootDir}/brat
# if this directory does not exist it will be created
contextDir = ${rootDir}/context


# this is where the output files containing the extracted mentions will be stored
# if this directory does not exist it will be created
outDir = ${rootDir}/output
Expand All @@ -28,7 +29,7 @@ encoding = "utf-8"

# this is a list of sections that we should ignore
ignoreSections = ["references", "materials", "materials|methods", "methods", "supplementary-material"]

//ignoreSections = []
# the output formats for mentions:
# "arizona" (column-based, one file per paper)
# "cmu" (column-based, one file per paper)
Expand All @@ -38,7 +39,7 @@ ignoreSections = ["references", "materials", "materials|methods", "methods", "su
outputTypes = ["fries", "arizona", "cmu"]

# number of simultaneous threads to use for parallelization
threadLimit = 2
threadLimit = 4

# verbose logging
verbose = true
Expand All @@ -49,12 +50,22 @@ withAssembly = false

# context engine configuration
contextEngine {
type = Policy4
type = Policy4
params = {
bound = 3
bound = 3
}
}

//contextEngine{
// type = SVMPolicy
// params = {
//
// bound = 3
// }
//}


# polairty engine configuration
polarity {
engine = Hybrid //Hybrid//DeepLearning //Linguistic
negCountThreshold = 1 // when lower than or equal to this value, use linguistic approach in hybrid method
Expand All @@ -76,6 +87,7 @@ experimentalRegulation{
keywords = main/src/main/resources/experimental_regulation_type_keywords.csv
}


# grounding configuration
grounding: {
# List of AdHoc grounding files to insert, in order, into the grounding search sequence.
Expand All @@ -93,7 +105,7 @@ grounding: {
logging {
# defines project-wide logging level
loglevel = INFO
logfile = ${rootDir}/reach.log
logfile = ${outDir}/reach.log
}

# Processor Annotator choice and configuration
Expand All @@ -105,7 +117,7 @@ processorAnnotator {
# restart configuration
restart {
# restart allows batch jobs to skip over input files already successfully processed
useRestart = true
useRestart = false
# restart log is one filename per line list of input files already successfully processed
logfile = ${outDir}/restart.log
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion main/src/main/scala/org/clulab/reach/FriesEntry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.clulab.reach

import ai.lum.nxmlreader.NxmlDocument


// Another test comment, just in case
case class FriesEntry(
name: String,
chunkId: String,
Expand Down
2 changes: 2 additions & 0 deletions main/src/main/scala/org/clulab/reach/RuleReader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import scala.io.Source
/**
* Utilities to read rule files
*/


object RuleReader {

case class Rules(entities: String, modifications: String, events: String, context: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ object ContextEngine extends LazyLogging {

val labels = mention.labels filter (contextMatching.contains(_))


(labels.head, id)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ object ContextEngineFactory {
val Policy2 = Value("Policy2")
val Policy3 = Value("Policy3")
val Policy4 = Value("Policy4")
val SVMPolicy = Value("SVMPolicy")
}
import Engine._

Expand All @@ -36,6 +37,10 @@ object ContextEngineFactory {
case None => new BidirectionalPaddingContext
}
case Dummy => new DummyContextEngine
case SVMPolicy => bound match {
case w @ Some(b) => new SVMContextEngine(w)
case None => new SVMContextEngine
}
case _ => new DummyContextEngine
}
}
Expand Down
4 changes: 3 additions & 1 deletion main/src/main/scala/org/clulab/reach/context/Policies.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.clulab.reach.context

import org.clulab.reach.context.feature_utils.ContextFeatureUtils
import org.clulab.reach.mentions._

import collection.mutable


Expand Down Expand Up @@ -36,7 +38,7 @@ class BoundedPaddingContext(
// Assign the context map to the mention
m.context = if(contextMap != Map.empty) Some(contextMap) else None
}

//ContextFeatureUtils.writeRowsToFile(mentions)
mentions
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import org.clulab.reach.mentions._
abstract class RuleBasedContextEngine extends ContextEngine {

// Fields
// To be overriden in the implementations. Returns a sequence of (Type, Val) features
// Feature order should be kept consisting for all return values
// To be overridden in the implementations. Returns a sequence of (Type, Val) features
// Feature order should be kept consistent for all return values
var orderedContextMentions:Map[Int, Seq[BioTextBoundMention]] = _
// This is to keep the default species if necessary
var defaultContexts:Option[Map[String, String]] = None
Expand All @@ -26,7 +26,7 @@ abstract class RuleBasedContextEngine extends ContextEngine {
// Compute default context classes
// First count the context types
val contextCounts:Map[(String, String), Int] = contextMentions map ContextEngine.getContextKey groupBy identity mapValues (_.size)
// Then gorup them by class
// Then group them by class
val defaultContexts:Map[String, String] = contextCounts.toSeq.groupBy(_._1._1)
// Sort them in decreasing order by frequency
.mapValues(_.map(t => (t._1._2, t._2)))
Expand Down
Loading