ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1770061 - in /ctakes/trunk/ctakes-temporal/scripts/nn: cnn_classify_hybrid.py cnn_train_hybrid.py dataset_hybrid.pyc et_cleartk_io.pyc nn_models.pyc
Date Wed, 16 Nov 2016 21:45:35 GMT
Author: dligach
Date: Wed Nov 16 21:45:35 2016
New Revision: 1770061

URL: http://svn.apache.org/viewvc?rev=1770061&view=rev
Log:
finally working version of cnn for pos+token features

Modified:
    ctakes/trunk/ctakes-temporal/scripts/nn/cnn_classify_hybrid.py
    ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_hybrid.py
    ctakes/trunk/ctakes-temporal/scripts/nn/dataset_hybrid.pyc
    ctakes/trunk/ctakes-temporal/scripts/nn/et_cleartk_io.pyc
    ctakes/trunk/ctakes-temporal/scripts/nn/nn_models.pyc

Modified: ctakes/trunk/ctakes-temporal/scripts/nn/cnn_classify_hybrid.py
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/cnn_classify_hybrid.py?rev=1770061&r1=1770060&r2=1770061&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/scripts/nn/cnn_classify_hybrid.py (original)
+++ ctakes/trunk/ctakes-temporal/scripts/nn/cnn_classify_hybrid.py Wed Nov 16 21:45:35 2016
@@ -14,7 +14,7 @@ def main(args):
         sys.exit(-1)
     working_dir = args[0]
 
-    target_dir = 'ctakes-temporal/target/eval/thyme/train_and_test/event-time/'
+    target_dir = 'ctakes-temporal/target/eval/thyme/train_and_test/event-event/'
     model_dir = os.path.join(os.environ['CTAKES_ROOT'], target_dir)
     maxlen   = pickle.load(open(os.path.join(model_dir, "maxlen.p"), "rb"))
     word2int = pickle.load(open(os.path.join(model_dir, "word2int.p"), "rb"))
@@ -47,7 +47,7 @@ def main(args):
                 if tag in tag2int:
                     tags.append(tag2int[tag])
                 else:
-                    tags.append(tag2int['oov_word'])
+                    tags.append(tag2int['oov_tag'])
                     
             if len(tokens) > maxlen:
                 tokens = tokens[0:maxlen]

Modified: ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_hybrid.py
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_hybrid.py?rev=1770061&r1=1770060&r2=1770061&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_hybrid.py (original)
+++ ctakes/trunk/ctakes-temporal/scripts/nn/cnn_train_hybrid.py Wed Nov 16 21:45:35 2016
@@ -101,7 +101,7 @@ def main(args):
                   metrics=['accuracy'])
     model.fit(train_xs,
               train_y,
-              nb_epoch=5,
+              nb_epoch=3,
               batch_size=50,
               verbose=0,
               validation_split=0.1)

Modified: ctakes/trunk/ctakes-temporal/scripts/nn/dataset_hybrid.pyc
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/dataset_hybrid.pyc?rev=1770061&r1=1770060&r2=1770061&view=diff
==============================================================================
Binary files - no diff available.

Modified: ctakes/trunk/ctakes-temporal/scripts/nn/et_cleartk_io.pyc
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/et_cleartk_io.pyc?rev=1770061&r1=1770060&r2=1770061&view=diff
==============================================================================
Binary files - no diff available.

Modified: ctakes/trunk/ctakes-temporal/scripts/nn/nn_models.pyc
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/scripts/nn/nn_models.pyc?rev=1770061&r1=1770060&r2=1770061&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message