Skip to content

Commit

Permalink
pass elastic search url through config files
Browse files Browse the repository at this point in the history
  • Loading branch information
gadelrab committed May 13, 2019
1 parent d92bf49 commit 92b4a07
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Demo
Submodule Demo updated 1 files
+3 −1 conf/demo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,45 @@
*/
public class EvidenceNode{

// @JsonAdapter(ILiteralAdapter.class)
ILiteral queryLiteral;
Enums.ActionType sourceActionType = Enums.ActionType.ORG;
// @JsonAdapter(IRuleAdapter.class)
private IRule rule;
//TODO to be fixed later
//@Expose(deserialize = false)
//private Map<IVariable, ITerm> variableBindingMap;
private FactSpottingResult textResults;

// @JsonAdapter(ILiteralAdapter.class)
ILiteral queryLiteral;
Enums.ActionType sourceActionType = Enums.ActionType.ORG;
private int treeDepth;
private int rulesDepth;
private double quality;

public EvidenceNode(ILiteral queryLiteral, Enums.ActionType sourceActionType) {
this.queryLiteral = queryLiteral;
this.sourceActionType = sourceActionType;
}

public IRule getRule() {
return rule;
}

public void setRule(IRule rule) {
this.rule = rule;
}

public FactSpottingResult getTextResults() {
return textResults;
}

public void setRule(IRule rule) {
this.rule = rule;
public void setTextResults(FactSpottingResult textResults){
this.textResults=textResults;

}

public void setVariableBindingMap(Map<IVariable, ITerm> variableBindingMap) {
//this.variableBindingMap = variableBindingMap;
}

public EvidenceNode(ILiteral queryLiteral, Enums.ActionType sourceActionType) {
this.queryLiteral = queryLiteral;
this.sourceActionType = sourceActionType;
}

public ILiteral getQueryLiteral() {
return queryLiteral;
}
Expand All @@ -75,11 +79,6 @@ public void setSourceActionType(Enums.ActionType sourceActionType) {
this.sourceActionType = sourceActionType;
}

public void setTextResults(FactSpottingResult textResults){
this.textResults=textResults;

}

@Override
public String toString() {
return "Evidence{" +
Expand Down
2 changes: 1 addition & 1 deletion Utils
Submodule Utils updated from 8754d5 to 9a457a
2 changes: 2 additions & 0 deletions WebService2/conf/factspotting_demo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ argumentsDictionaries=/GW/D5data-7/gadelrab/demo_data/dicts/entities_manual.tsv
#perItemParaphrases=10



# Elasticsearch
#evidencePerFactSize=5
#only 1 corpus is supported now
textCorpora=wiki_sent
fieldsToSearch=sent,title
elastic.queryStyle=SPLIT_QUERY
elastic.url=http://localhost:36550

matchingThresholdPercentage=90%
#bing.cacheFile=
Expand Down
2 changes: 1 addition & 1 deletion WebService2/conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GET / controllers.Explanations.index
# An example controller showing how to use dependency injection
#GET /count controllers.CountController.count
# An example controller showing how to write asynchronous code
GET /message controllers.AsyncController.message
#GET /message controllers.AsyncController.message

POST / controllers.Explanations.explain

Expand Down
6 changes: 4 additions & 2 deletions scripts/run_webservice2.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env bash

SERVER_ELASTIC=$1
PORT=$2
#connect to server hosting ELASTIC
ssh -f sedna.mpi-inf.mpg.de -L 9200:localhost:9200 -N
ssh -f $SERVER_ELASTIC -L ${PORT}:localhost:${PORT} -N

# we need locations of data and configurations
DEMO_DATA_FOLDER=$1
DEMO_DATA_FOLDER=$3

echo $DEMO_DATA_FOLDER

Expand Down

0 comments on commit 92b4a07

Please sign in to comment.