Skip to content

Commit

Permalink
2016.04.30_stellar
Browse files Browse the repository at this point in the history
Lefteris Paraskevas

[ADD]: Generated JavaDoc.
[REF]: Various name changes.
[REA]: Various JavaDoc fixes.
--------------------------------------------------
#All comments must be removed prior to commit except from the 'Committing two milestones' info
  • Loading branch information
Lefteris authored and Lefteris committed Apr 30, 2016
1 parent 4263804 commit f22fa5a
Show file tree
Hide file tree
Showing 26 changed files with 212 additions and 225 deletions.
68 changes: 14 additions & 54 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
file.reference.commons-cli-1.3.1-javadoc.jar=lib/commons-cli-1.3.1-javadoc.jar
file.reference.commons-cli-1.3.1.jar=lib/commons-cli-1.3.1.jar
#Fri Apr 29 13:47:44 EEST 2016
#Sat Apr 30 17:10:14 EEST 2016
jnlp.offline-allowed=false
javadoc.splitindex=true
file.reference.commons-cli-1.3.1-javadoc.jar=lib/commons-cli-1.3.1-javadoc.jar
file.reference.twitter4j-examples-4.0.4.jar=lib/twitter4j-examples-4.0.4.jar
file.reference.bson-3.0.4.jar=lib/bson-3.0.4.jar
build.classes.excludes=**/*.java,**/*.form
Expand All @@ -11,9 +10,7 @@ build.sysclasspath=ignore
file.reference.twitter4j-media-support-4.0.4.jar=lib/twitter4j-media-support-4.0.4.jar
javac.target=1.8
build.generated.dir=${build.dir}/generated
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
run.classpath=${javac.classpath}\:${build.classes.dir}
file.reference.mongodb-driver-3.0.4.jar=lib/mongodb-driver-3.0.4.jar
file.reference.reflections-0.9.9-RC1.jar=lib/reflections-0.9.9-RC1.jar
debug.test.classpath=${run.test.classpath}
Expand Down Expand Up @@ -48,9 +45,7 @@ run.jvmargs=
manifest.custom.permissions=
javac.test.processorpath=${javac.test.classpath}
dist.archive.excludes=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
build.generated.sources.dir=${build.dir}/generated-sources
jnlp.signing=
javadoc.notree=false
Expand All @@ -67,77 +62,42 @@ dist.javadoc.dir=${dist.dir}/javadoc
file.reference.xom.jar=lib/xom.jar
file.reference.commons-math3-3.4.jar=lib/commons-math3-3.4.jar
javadoc.additionalparam=
javac.classpath=\
${file.reference.HAC.jar}:\
${file.reference.twitter4j-async-4.0.4.jar}:\
${file.reference.twitter4j-core-4.0.4.jar}:\
${file.reference.twitter4j-examples-4.0.4.jar}:\
${file.reference.twitter4j-media-support-4.0.4.jar}:\
${file.reference.twitter4j-stream-4.0.4.jar}:\
${file.reference.bson-3.0.4.jar}:\
${file.reference.commons-io-2.4.jar}:\
${file.reference.commons-lang3-3.1.jar}:\
${file.reference.commons-math3-3.4.jar}:\
${file.reference.controlsfx-8.40.10-20150826.135843-344.jar}:\
${file.reference.gs-algo-1.2.jar}:\
${file.reference.gs-core-1.2.jar}:\
${file.reference.gs-ui-1.2.jar}:\
${file.reference.guava-18.0.jar}:\
${file.reference.javassist.jar}:\
${file.reference.jmod-1.2b.jar}:\
${file.reference.jtransforms-2.4.jar}:\
${file.reference.lucene-analyzers-common-4.10.2.jar}:\
${file.reference.lucene-core-4.10.2.jar}:\
${file.reference.mongodb-driver-3.0.4.jar}:\
${file.reference.mongodb-driver-async-3.0.4.jar}:\
${file.reference.mongodb-driver-core-3.0.4.jar}:\
${file.reference.reflections-0.9.9-RC1.jar}:\
${file.reference.xom.jar}:\
${file.reference.ejml-0.23.jar}:\
${file.reference.stanford-corenlp-3.5.2.jar}:\
${file.reference.stanford-corenlp-3.5.2-models.jar}:\
${file.reference.jWave_java_groovy.jar}:\
${file.reference.commons-cli-1.3.1-javadoc.jar}:\
${file.reference.commons-cli-1.3.1.jar}
javac.classpath=${file.reference.HAC.jar}\:${file.reference.twitter4j-async-4.0.4.jar}\:${file.reference.twitter4j-core-4.0.4.jar}\:${file.reference.twitter4j-examples-4.0.4.jar}\:${file.reference.twitter4j-media-support-4.0.4.jar}\:${file.reference.twitter4j-stream-4.0.4.jar}\:${file.reference.bson-3.0.4.jar}\:${file.reference.commons-io-2.4.jar}\:${file.reference.commons-lang3-3.1.jar}\:${file.reference.commons-math3-3.4.jar}\:${file.reference.controlsfx-8.40.10-20150826.135843-344.jar}\:${file.reference.gs-algo-1.2.jar}\:${file.reference.gs-core-1.2.jar}\:${file.reference.gs-ui-1.2.jar}\:${file.reference.guava-18.0.jar}\:${file.reference.javassist.jar}\:${file.reference.jmod-1.2b.jar}\:${file.reference.jtransforms-2.4.jar}\:${file.reference.lucene-analyzers-common-4.10.2.jar}\:${file.reference.lucene-core-4.10.2.jar}\:${file.reference.mongodb-driver-3.0.4.jar}\:${file.reference.mongodb-driver-async-3.0.4.jar}\:${file.reference.mongodb-driver-core-3.0.4.jar}\:${file.reference.reflections-0.9.9-RC1.jar}\:${file.reference.xom.jar}\:${file.reference.ejml-0.23.jar}\:${file.reference.stanford-corenlp-3.5.2.jar}\:${file.reference.stanford-corenlp-3.5.2-models.jar}\:${file.reference.jWave_java_groovy.jar}\:${file.reference.commons-cli-1.3.1-javadoc.jar}\:${file.reference.commons-cli-1.3.1.jar}
javadoc.noindex=false
manifest.custom.codebase=
file.reference.jtransforms-2.4.jar=lib/jtransforms-2.4.jar
file.reference.commons-cli-1.3.1.jar=lib/commons-cli-1.3.1.jar
annotation.processing.enabled.in.editor=false
file.reference.controlsfx-8.40.10-20150826.135843-344.jar=lib/controlsfx-8.40.10-20150826.135843-344.jar
javadoc.private=false
file.reference.commons-io-2.4.jar=lib/commons-io-2.4.jar
build.test.classes.dir=${build.dir}/test/classes
javadoc.private=false
javadoc.encoding=${source.encoding}
build.test.classes.dir=${build.dir}/test/classes
jar.index=${jnlp.enabled}
javac.compilerargs=
file.reference.lucene-analyzers-common-4.10.2.jar=lib/lucene-analyzers-common-4.10.2.jar
project.license=gpl30
source.encoding=UTF-8
project.license=gpl30
file.reference.gs-algo-1.2.jar=lib/gs-algo-1.2.jar
jnlp.signing.keystore=
meta.inf.dir=${src.dir}/META-INF
excludes=
annotation.processing.run.all.processors=true
excludes=
application.title=MSc
jnlp.codebase.type=no.codebase
file.reference.stanford-corenlp-3.5.2-models.jar=lib/stanford-corenlp-3.5.2-models.jar
javac.processorpath=\
${javac.classpath}
javac.processorpath=${javac.classpath}
build.test.results.dir=${build.dir}/test/results
file.reference.commons-lang3-3.1.jar=lib/commons-lang3-3.1.jar
endorsed.classpath=
javadoc.use=true
endorsed.classpath=
javadoc.nonavbar=false
jnlp.signing.alias=
javadoc.windowtitle=
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit_4.classpath}:\
${libs.hamcrest.classpath}
javac.test.classpath=${javac.classpath}\:${build.classes.dir}\:${libs.junit_4.classpath}\:${libs.hamcrest.classpath}
file.reference.mongodb-driver-core-3.0.4.jar=lib/mongodb-driver-core-3.0.4.jar
src.dir=src
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
file.reference.HAC.jar=lib/HAC.jar
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
debug.classpath=${run.classpath}
jnlp.enabled=false
5 changes: 3 additions & 2 deletions src/edmodule/AbstractEDMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* but every separate ED technique has to implement these 6 methods.
*
* @author Lefteris Paraskevas
* @version 2016.04.09_1945
* @version 2016.04.30_1825
*/
public interface AbstractEDMethod {

Expand All @@ -35,7 +35,7 @@ public interface AbstractEDMethod {
/**
* Get the citation of the paper that introduced the used Event Detection algorithm.
* @return A String containing the citation. The String must start and end
* with '<li>' tags.
* with '&lt;li&gt;' tags.
*/
public abstract String getCitation();

Expand All @@ -55,6 +55,7 @@ public interface AbstractEDMethod {

/**
* Main method that starts the execution of the Event Detection algorithm.
* @throws java.lang.Exception General Exception
*/
public abstract void apply() throws Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/edmodule/EDMethodPicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static void selectEDMethod(Config config, boolean showInlineInfo,
List<BinPair<String, Integer>> bins = BinsCreator.createBins(corpus, config, window);

PeakFindingExperimenter exper = new PeakFindingExperimenter(corpus,
bins, alpha, taph, pi, window, config);
bins, alpha, taph, pi, config);

//Experiment with Taph
List<String> lines = exper.experimentUsingTaph(1, 10, 1, showInlineInfo);
Expand Down
5 changes: 3 additions & 2 deletions src/edmodule/data/EDCoWCorpus.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/**
*
* @author Lefteris Paraskevas
* @version 2016.04.09_1959
* @version 2016.04.30_1826
*/
public class EDCoWCorpus {

Expand Down Expand Up @@ -175,6 +175,7 @@ public final void createCorpus() {
* into that time period.
* @param cal A Calendar instance, already set.
* @param date The date to be checked.
* @return A String key with date information.
*/
public final String updateMessageDistribution(Calendar cal, Date date) {
String key = StringDateUtils.getDateKey(cal, date, refreshWindow);
Expand Down Expand Up @@ -202,7 +203,7 @@ public List<String> getTerms() {

/**
* Initializes and stores a list containing objects of DocumentTermFrequencyItem
* class. <br/>
* class. <br>
* More formally, each listing in this list contains a triplet with the ID of
* a document, the ID of a term that the document contains and the term's
* frequency.
Expand Down
14 changes: 7 additions & 7 deletions src/edmodule/data/PeakFindingCorpus.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
*
* @author Lefteris Paraskevas
* @version 2016.04.09_2000
* @version 2016.04.30_1826
*/
public class PeakFindingCorpus {

Expand Down Expand Up @@ -64,13 +64,13 @@ public PeakFindingCorpus(Config config, List<Tweet> tweets, StopWordsHandlers sw
* earliest and the latest date of corpus if needed (assuming that the corpus
* has some extend of sparseness).
* @param window An integer indicating the time interval in which the tweets
* should be counted. All values in minutes. <br/>
* E.g. For 1 minute interval --> 1. <br/>
* For half an hour interval --> 30. <br/>
* For 5 hours interval --> 300.
* should be counted. All values in minutes. <br>
* E.g. For 1 minute interval, 1. <br>
* For half an hour interval, 30. <br>
* For 5 hours interval, 300.
* @return A HashMap containing the bins.
* @see BinsCreator BinsCreator class.
* @see OfflinePeakFinding OfflinePeakFinding class.
* @see edmodule.peakfinding.BinsCreator BinsCreator class.
* @see edmodule.peakfinding.OfflinePeakFinding OfflinePeakFinding class.
*/
public final HashMap<String, Integer> createCorpus(int window) {
//Initialize variables
Expand Down
19 changes: 10 additions & 9 deletions src/edmodule/edcow/EDCoW.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
/**
*
* @author Adrien GUILLE, ERIC Lab, University of Lyon 2
* @email adrien.guille@univ-lyon2.fr
* email adrien.guille@univ-lyon2.fr
*
* @author Lefteris Paraskevas (configurations in EDCoW to omit missing components)
* @version 2016.04.09_2001 (For EvS project version alignment)
* @version 2016.04.30_1826 (For EvS project version alignment)
*/
public class EDCoW implements AbstractEDMethod {
private final int delta; //6
Expand All @@ -51,12 +51,12 @@ public class EDCoW implements AbstractEDMethod {
private long executionTime;

/**
* Default constructor with minimum parameters. <br/>
* Default constructor with minimum parameters. <br>
* Delta is set to 6, gamma is set to 5, minimum term support is set to
* 0.0001 and maximum term support is set to 0.01. If you wish to change the
* aforementioned values use the {@link #EDCoW(int, int, int, double, double,
* int, int, EDCoWCorpus) second constructor}.
* @param delta2 Delta2 value. <br/>
* @param delta2 Delta2 value. <br>
* Prime divisors of the number of documents are required as values. It must
* be cross-referenced with the number of documents. More specifically, the
* outcome of the division between the number of documents and this metric
Expand All @@ -78,21 +78,21 @@ public EDCoW(int delta2, int timeSliceA, int timeSliceB, EDCoWCorpus corpus) {

/**
* Default constructor with the full set of parameters.
* @param delta1 Delta value (suggested 6). <br/>
* @param delta1 Delta value (suggested 6). <br>
* It directly affects the number of events. Increasing this value, reduces
* the number of them and vice versa.
* @param delta2 Delta2 value. <br/>
* @param delta2 Delta2 value. <br>
* Prime divisors of the number of documents are required as values. It must
* be cross-referenced with the number of documents. More specifically, the
* outcome of the division between the number of documents and this metric
* should result the number of total windows.
* @param gamma Gamma value (suggested 5). <br/>
* @param gamma Gamma value (suggested 5). <br>
* It affects the quality of the uncovered events. Values greater than 15,
* seem to increase the number of the uncovered events.
* @param minTermSupport Minimum term support value (suggested 0.0001). <br/>
* @param minTermSupport Minimum term support value (suggested 0.0001). <br>
* Changing this value would result in altering the lower bound below which
* a term should not be included in the keywords list of an event.
* @param maxTermSupport Maximum term support value (suggested 0.01). <br/>
* @param maxTermSupport Maximum term support value (suggested 0.01). <br>
* Changing this value would result in altering the upper bound above which
* a term should not be included in the keywords list of an event.
* @param timeSliceA Starting timeslice.
Expand Down Expand Up @@ -199,6 +199,7 @@ public void apply() {
* Method to run the algorithm and analyze terms and frequencies in a
* specific window.
* @param window The window index (0, 1, 2 etc).
* @throws java.lang.Exception General Exception.
*/
public void processWindow(int window) throws Exception {
LinkedList<EDCoWKeyword> keyWords = new LinkedList<>();
Expand Down
11 changes: 6 additions & 5 deletions src/edmodule/peakfinding/BinsCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@
/**
*
* @author Lefteris Paraskevas
* @version 2016.02.19_1711
* @version 2016.04.30_1826
*/
public class BinsCreator {

/**
* Method to create and return the bins needed for OfflinePeakFinding algorithm to operate.
* More formally, it creates an List of BinPair objects, containing the count
* of tweets in pre-specified time intervals (windows).
* @param corpus A PeakFindingCorpus object.
* @param config A Configuration object.
* @param refreshWindow An integer indicating the time interval in which the tweets
* should be counted.All values in minutes. <br/>
* E.g. For 1 minute interval --> 1. <br/>
* For half an hour interval --> 30. <br/>
* For 5 hours interval --> 300.
* should be counted.All values in minutes. <br>
* E.g. For 1 minute interval --&gt; 1. <br>
* For half an hour interval --&gt; 30. <br>
* For 5 hours interval --&gt; 300.
* @return An List of BinPair objects containing the bins.
* @see StringDateUtils StringDateUtils class.
* @see BinPair BinPair class.
Expand Down
3 changes: 1 addition & 2 deletions src/edmodule/peakfinding/OfflinePeakFinding.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
*
* @author Lefteris Paraskevas
* @version 2016.04.09_2003
* @version 2016.04.30_1826
*
* Based on [1] Marcus A. et al., "TwitInfo: Aggregating and Visualizing Microblogs
* for PeakFindingEvent Exploration", CHI 2011.
Expand All @@ -55,7 +55,6 @@ public class OfflinePeakFinding implements AbstractEDMethod {
* @param a Alpha parameter to capture historical information. Values lower than 1 are recommended.
* @param t Threshold parameter.
* @param p Primary parameter indicates the first bins to be considered in calculating initial mean deviance.
* @param refreshWindow An integer representing the refresh window of every bin.
* @param corpus A PeakFindingCorpus object.
*/
public OfflinePeakFinding(List<BinPair<String, Integer>> bins, double a, int t, int p, PeakFindingCorpus corpus) {
Expand Down
8 changes: 4 additions & 4 deletions src/edmodule/peakfinding/event/PeakFindingEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
*
* @author Lefteris Paraskevas
* @version 2016.04.09_2004
* @version 2016.04.30_1827
*/
public class PeakFindingEvent {

Expand Down Expand Up @@ -83,7 +83,7 @@ public PeakFindingEvent(int id, Window<Integer, Integer> window, List<Tweet> twe

/**
* Generates a List with the most common terms of the tweetsOfEvent that belong
* to the specific event. <br/>
* to the specific event. <br>
* More formally, it parses every single tweet of the event, tokenizes it
* and stores the terms in a HashMap with their respective occurencies as
* values.
Expand Down Expand Up @@ -148,7 +148,7 @@ public final List<String> getTweetIDs() {
/**
* Returns the five most common terms as a single String.
* @return A String containing the five most common terms.
* @see getCommonTerms() getCommonTerms() method.
* @see #getCommonTerms() getCommonTerms() method.
*/
public final String getCommonTermsAsString() {
if(commonTerms.isEmpty()) {
Expand All @@ -167,7 +167,7 @@ public final String getCommonTermsAsString() {
/**
* Auxiliary method to sort a Map by value.
* @param unsortedMap The Map to be sorted.
* @return A sorted List of the String keys.
* @param stemHandler A StemUtils object.
*/
public final void sortMapByValue(HashMap<String, Integer> unsortedMap, StemUtils stemHandler) {
//Initialize variables
Expand Down
5 changes: 3 additions & 2 deletions src/edmodule/peakfinding/event/PeakFindingEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
*
* @author Lefteris Paraskevas
* @version 2016.04.09_2005
* @version 2016.04.30_1827
*/
public class PeakFindingEvents {

Expand All @@ -46,6 +46,7 @@ public class PeakFindingEvents {
* @param bins A List of BinPair objects, containing all bins.
* @param eventWindows A List of Window objects, containing the generated eventsTweets.
* @param corpus A PeakFindingCorpus object.
* @param stemsHandler A StemUtils object.
*/
public PeakFindingEvents(HashMap<String, ArrayList<Tweet>> tweetsByWindow,
List<BinPair<String, Integer>> bins,
Expand All @@ -59,7 +60,7 @@ public PeakFindingEvents(HashMap<String, ArrayList<Tweet>> tweetsByWindow,
}

/**
* Returns the tweets that belong to a certain event. <br/>
* Returns the tweets that belong to a certain event. <br>
* More formally, it parses the auxiliary tweetsByWindow HashMap and appends
* the relevant tweets into a String list.
* @param window A Window object, the actual event.
Expand Down
Loading

0 comments on commit f22fa5a

Please sign in to comment.