-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from rwth-acis/SocialBotFramework
Social bot framework
- Loading branch information
Showing
13 changed files
with
373 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
core/src/main/java/i5/las2peer/logging/bot/BotContentGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package i5.las2peer.logging.bot; | ||
|
||
public interface BotContentGenerator { | ||
|
||
public boolean trainStep(String input, String output); | ||
|
||
public boolean train(String out_dir, double learning_rate, int num_training_steps); | ||
|
||
public Object inference(String input); | ||
|
||
} |
85 changes: 85 additions & 0 deletions
85
core/src/main/java/i5/las2peer/logging/bot/BotMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package i5.las2peer.logging.bot; | ||
|
||
import java.io.Serializable; | ||
|
||
import i5.las2peer.api.logging.MonitoringEvent; | ||
|
||
public class BotMessage implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private Long timestamp; | ||
private MonitoringEvent event; | ||
private String sourceNode; | ||
private String sourceAgentId; | ||
private String destinationNode; | ||
private String destinationAgentId; | ||
private String remarks; | ||
|
||
public BotMessage(Long timestamp, MonitoringEvent event, String sourceNode, String sourceAgentId, | ||
String destinationNode, String destinationAgentId, String remarks) { | ||
this.timestamp = timestamp; | ||
this.event = event; | ||
this.sourceNode = sourceNode; | ||
this.sourceAgentId = sourceAgentId; | ||
this.destinationNode = destinationNode; | ||
this.destinationAgentId = destinationAgentId; | ||
this.remarks = remarks; | ||
} | ||
|
||
public Long getTimestamp() { | ||
return timestamp; | ||
} | ||
|
||
public void setTimestamp(Long timestamp) { | ||
this.timestamp = timestamp; | ||
} | ||
|
||
public MonitoringEvent getEvent() { | ||
return event; | ||
} | ||
|
||
public void setEvent(MonitoringEvent event) { | ||
this.event = event; | ||
} | ||
|
||
public String getSourceNode() { | ||
return sourceNode; | ||
} | ||
|
||
public void setSourceNode(String sourceNode) { | ||
this.sourceNode = sourceNode; | ||
} | ||
|
||
public String getSourceAgentId() { | ||
return sourceAgentId; | ||
} | ||
|
||
public void setSourceAgentId(String sourceAgentId) { | ||
this.sourceAgentId = sourceAgentId; | ||
} | ||
|
||
public String getDestinationNode() { | ||
return destinationNode; | ||
} | ||
|
||
public void setDestinationNode(String destinationNode) { | ||
this.destinationNode = destinationNode; | ||
} | ||
|
||
public String getDestinationAgentId() { | ||
return destinationAgentId; | ||
} | ||
|
||
public void setDestinationAgentId(String destinationAgentId) { | ||
this.destinationAgentId = destinationAgentId; | ||
} | ||
|
||
public String getRemarks() { | ||
return remarks; | ||
} | ||
|
||
public void setRemarks(String remarks) { | ||
this.remarks = remarks; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package i5.las2peer.logging.bot; | ||
|
||
public enum BotStatus { | ||
DISABLED(0), | ||
READY(1), | ||
RUNNING(2), | ||
TRAINING(3), | ||
BUSY(4); | ||
|
||
private int status; | ||
|
||
public int getStatusCode() { | ||
return status; | ||
} | ||
|
||
BotStatus(int status) { | ||
this.status = status; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.