Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. #Below are some basic options. See edu.stanford.nlp.ie.machinereading.MachineReadingProperties class for more options.
  2.  
  3. # Pipeline options
  4. annotators = pos, lemma, parse
  5. parse.maxlen = 100
  6.  
  7. # MachineReading properties. You need one class to read the dataset into correct format. See edu.stanford.nlp.ie.machinereading.domains.ace.AceReader for another example.
  8. datasetReaderClass = edu.stanford.nlp.ie.machinereading.domains.roth.RothCONLL04Reader
  9.  
  10. readerLogLevel = INFO
  11. #Data directory for training. The datasetReaderClass reads data from this path and makes corresponding sentences and annotations.
  12. trainPath = ../re-training-data.corp
  13.  
  14. #Whether to crossValidate, that is evaluate, or just train.
  15. crossValidate = false
  16. kfold = 10
  17.  
  18. #Change this to true if you want to use CoreNLP pipeline generated NER tags. The default model generated with the relation extractor release uses the CoreNLP pipeline provided tags (option set to true$
  19. trainUsePipelineNER=true
  20.  
  21. # where to save training sentences. uses the file if it exists, otherwise creates it.
  22. serializedTrainingSentencesPath = tmp/roth_sentences.ser
  23.  
  24. serializedEntityExtractorPath = tmp/roth_entity_model.ser
  25.  
  26. # where to store the output of the extractor (sentence objects with relations generated by the model). This is what you will use as the model when using 'relation' annotator in the CoreNLP pipeline.
  27. serializedRelationExtractorPath = tmp/kpl-relation-model-pipeline.ser
  28.  
  29. # uncomment to load a serialized model instead of retraining
  30. # loadModel = true
  31.  
  32. #relationResultsPrinters = edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter,edu.stanford.nlp.ie.machinereading.domains.roth.RothResultsByRelation. For printing output of the model.
  33. relationResultsPrinters = edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter
  34.  
  35. #In this domain, this is trivial since all the entities are given (or set using CoreNLP NER tagger).
  36. entityClassifier = edu.stanford.nlp.ie.machinereading.domains.roth.RothEntityExtractor
  37.  
  38. extractRelations = true
  39. extractEvents = false
  40.  
  41. #We are setting the entities beforehand so the model does not learn how to extract entities etc.
  42. extractEntities = false
  43.  
  44. #Opposite of crossValidate.
  45. trainOnly=true
  46.  
  47. # The set chosen by feature selection using RothCONLL04:
  48. relationFeatures = arg_words,arg_type,dependency_path_lowlevel,dependency_path_words,surface_path_POS,entities_between_args,full_tree_path
  49.  
  50. sudo java -cp stanford-corenlp-3.7.0.jar:stanford-corenlp-3.7.0-models.jar edu.stanford.nlp.ie.machinereading.MachineReading --arguments kpl-re-model.properties
  51.  
  52. PERCENTAGE OF TRAIN: 1.0
  53. The reader log level is set to INFO
  54. Adding annotator pos
  55. Loading POS tagger from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [0.8 sec].
  56. Adding annotator lemma
  57. Adding annotator parse
  58. Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ... done [0.6 sec].
  59. Jan 17, 2017 4:55:06 PM edu.stanford.nlp.ie.machinereading.MachineReading makeResultsPrinters
  60. INFO: Making result printers from
  61. Jan 17, 2017 4:55:06 PM edu.stanford.nlp.ie.machinereading.MachineReading makeResultsPrinters
  62. INFO: Making result printers from edu.stanford.nlp.ie.machinereading.RelationExtractorResultsPrinter
  63. Jan 17, 2017 4:55:06 PM edu.stanford.nlp.ie.machinereading.MachineReading makeResultsPrinters
  64. INFO: Making result printers from
  65. Jan 17, 2017 4:55:06 PM edu.stanford.nlp.ie.machinereading.MachineReading loadOrMakeSerializedSentences
  66. INFO: Parsing corpus sentences...
  67. Jan 17, 2017 4:55:06 PM edu.stanford.nlp.ie.machinereading.MachineReading loadOrMakeSerializedSentences
  68. INFO: These sentences will be serialized to /home/ubuntu/stanford-corenlp-full-2016-10-31/tmp/roth_sentences.ser
  69. Jan 17, 2017 4:55:06 PM edu.stanford.nlp.ie.machinereading.domains.roth.RothCONLL04Reader read
  70. INFO: Reading file: ../re-training-data.corp
  71. Jan 17, 2017 4:55:07 PM edu.stanford.nlp.ie.machinereading.GenericDataSetReader preProcessSentences
  72. SEVERE: GenericDataSetReader: Started pre-processing the corpus...
  73. Jan 17, 2017 4:55:07 PM edu.stanford.nlp.ie.machinereading.GenericDataSetReader preProcessSentences
  74. INFO: Annotating dataset with edu.stanford.nlp.pipeline.StanfordCoreNLP@5f9d02cb
  75. Jan 17, 2017 4:58:32 PM edu.stanford.nlp.ie.machinereading.GenericDataSetReader preProcessSentences
  76. SEVERE: GenericDataSetReader: Pre-processing complete.
  77. Jan 17, 2017 4:58:32 PM edu.stanford.nlp.ie.machinereading.GenericDataSetReader parse
  78. SEVERE: Changing NER tags using the CoreNLP pipeline.
  79. Replacing old annotator "parse" with signature [edu.stanford.nlp.pipeline.ParserAnnotator#parse.maxlen:100;#] with new annotator with signature [edu.stanford.nlp.pipeline.ParserAnnotator##]
  80. Adding annotator pos
  81. Adding annotator lemma
  82. Adding annotator ner
  83. Loading classifier from edu/stanford/nlp/models/ner/english.all.3class.distsim.crf.ser.gz ... done [1.4 sec].
  84. Loading classifier from edu/stanford/nlp/models/ner/english.muc.7class.distsim.crf.ser.gz ... done [0.5 sec].
  85. Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... done [0.5 sec].
  86. Jan 17, 2017 4:58:45 PM edu.stanford.nlp.ie.machinereading.MachineReading loadOrMakeSerializedSentences
  87. INFO: Done. Parsed 1183 sentences.
  88. Jan 17, 2017 4:58:45 PM edu.stanford.nlp.ie.machinereading.MachineReading loadOrMakeSerializedSentences
  89. INFO: Serializing parsed sentences to /home/ubuntu/stanford-corenlp-full-2016-10-31/tmp/roth_sentences.ser...
  90. Exception in thread "main" java.io.FileNotFoundException: tmp/roth_sentences.ser (No such file or directory)
  91. at java.io.FileOutputStream.open0(Native Method)
  92. at java.io.FileOutputStream.open(FileOutputStream.java:270)
  93. at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
  94. at edu.stanford.nlp.io.IOUtils.writeObjectToFile(IOUtils.java:77)
  95. at edu.stanford.nlp.io.IOUtils.writeObjectToFile(IOUtils.java:63)
  96. at edu.stanford.nlp.ie.machinereading.MachineReading.loadOrMakeSerializedSentences(MachineReading.java:914)
  97. at edu.stanford.nlp.ie.machinereading.MachineReading.run(MachineReading.java:270)
  98. at edu.stanford.nlp.ie.machinereading.MachineReading.main(MachineReading.java:111
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement