Skip to content

05. Event Detection Module

Lefteris Paraskevas edited this page May 12, 2016 · 2 revisions

This module provides functionality for implementing new Event Detection algorithms and executing existing ones. All new algorithms must be placed inside the edmodule package and the user is free to create new subpackages.

How can I create a new Event Detection algorithm?

You have to follow the next 7 steps:

  • Create your new main ED class by implementing the AbstractEDMethod class. You are advised to place all your classes inside a new subpackage under the /edmodule folder. For example, all the classes of the EDCoW algorithm are placed in the edmodule.edcow package. You are advised to use a simple and self-informative name for your algorithm which you can use it as the prefix for every other secondary class of it. For example, for the EDCoW algorithm all of its secondary classes start with the "EDCoW" prefix.
  • If you will employ a sentiment version of your algorithm, follow the same procedure as before and create a new Sentiment version of it, placed inside the evs.edmodule."your_alogirthm_name" package, using the same file structure as before. For example, the Sentiment version of EDCoW named "SentimentEDCoW" is placed inside the evs.edmodule.edcow package along with all of its classes.
  • You are advised to implement a corpus class for your algorithm, that will overlook the creation of the custom version of the dataset in order for it to be used to your algorithm. Place your class inside the edmodule.data package and name it after _"your_algorithm_name"Corpus. For example, the corpus of EDCoW is named EDCoWCorpus.
  • If you have created a Sentiment version of your algorithm, follow the same procedure and place your Sentiment corpus inside the evs.data package. Name the class after Sentiment_"your_algorithm_name"_Corpus. For example, the Sentiment corpus of EDCoW is named SentimentEDCoWCorpus.
  • (Optionally) Create an Evaluator class for you method. For more information, refer to 7. Evaluation Module.
  • (Optionally) Create an Experimenter class for your method. For more information, refer to 8. Experimenter Module.
  • Update the EDMethodPicker class to include the new algorithm. If you have created a Sentiment version of it, update EvS main class also. Also, consider updating the Console class with the appropriate arguments for externally using the tool (refer to Ch. 10)

How can I call a specific Event Detection algorithm?

There are multiple ways:

  • Directly create an object of the desired algorithm and run the overridden apply() method. More formally, you have to create a Dataset object first and then supply it an already implemented Corpus class, for the corpus creation process. Evaluation process is advisory, though if you have to test the accuracy and/or the precision of your method, you have to employ it either way. Refer to EDMethodPicker class for more information.
  • Use the above method along with an Experimentation class. Due to the fact that an algorithm might employ more than one parameter and these parametrized values are dataset dependent, you will have to test the correct values for your dataset. For this process, an Experimentation class was created to exhaustively test your algorithm, refer to section 8.
  • Use the built-in EDMethodPicker class.