Commit 287c5922 authored by pirapakaran's avatar pirapakaran
Browse files

Update README.md

parent 8a79c78a
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -47,9 +47,9 @@ For Annotation we used Maslow and Reiss motives. Maslow's hierarchy of needs is
First of all, two code files must be executed: Comparer.py and Readhumans.py. The Comparer.py requires the concept-net-assertions-5.6.0 and the selected dataset. The output is a concept-filtered and lemmatized set of words from each input set. When executing the Comparer code, the concrete path where the dataset is located must be specified. After that ontology_create has to be executed for the list with the concepts. Then the sets are split and lemmatized. Run through matching_dicts for final result with concepts. <br> Second, the Readhumans.py file is executed. As training set we use the ROCStories dev-set. The output is a file with the individual components of the set (e.g. file name). To choose the right directory in line 338 the file has to be edited specificly (dev -> motiv -> allcharlines).
<br> <br>

Graphpath: Path to constructed Concepts concept_graph_full <br>
Outputpath: Path to (empty) File, purpose written behind as _[purpose]
Purpose: --dev | --train | --test
> Graphpath: Path to constructed Concepts concept_graph_full <br>
> Outputpath: Path to (empty) File, purpose written behind as _[purpose]
> Purpose: --dev | --train | --test

### Start coding
To work, we use the steps provided by Debjit Paul from Ranking and Selecting Multi-Hop Knowledge Paths to Better Predict Human Needs (NAACL 2019)'. However, we had to modify and adapt these steps, which is why our given steps are slightly different from his. <br>
@@ -60,13 +60,13 @@ Prerequisite for this step is the previous download of the concept-net-assertion
```
python src/graph_model/conceptnet2graph.py /Ppath_to_unziped_conceptnet-assertions-5.6.0.csv_File
```
Output is the file concept_graph_full
> Output is the file concept_graph_full

### Construct subgraph per sentence for for train- test files

In this step we construct the subgraph for each sentence. <br>
Input: ConceptNet Graph, Data for train/test <br>
Output: directory with files for each sentence containing subgraphs
> Input: ConceptNet Graph, Data for train/test <br>
> Output: directory with files for each sentence containing subgraphs

```
python src/graph_model/make_sub_graph_server.py "inputfile" "graphpath" "outputpath" "--purpose" purpose <br>
@@ -80,10 +80,10 @@ Seperate sentences with newlines.


### Extracting relevant knowledge paths from subgraphs
Inputpath: path to inputfile from step 2 <br>
Outputpath: path to txt.file where extracted knowledgepaths can be saved <br>
Input: subgraphs and inputfile from step 2<br>
Output: .txtfile with knowledgepaths for each sentence
> Inputpath: path to inputfile from step 2 <br>
> Outputpath: path to txt.file where extracted knowledgepaths can be saved <br>
> Input: subgraphs and inputfile from step 2<br>
> Output: .txtfile with knowledgepaths for each sentence

```
python src/graph_model/extract_path3.py