From 14960949b34206e8ee91a19534fc2010a8bc4fbc Mon Sep 17 00:00:00 2001 From: Jonas Weinz Date: Fri, 27 Jul 2018 13:14:58 +0000 Subject: [PATCH] Update 'Project/naive_approach/README.md' --- Project/naive_approach/README.md | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Project/naive_approach/README.md b/Project/naive_approach/README.md index e24455e..22371ae 100644 --- a/Project/naive_approach/README.md +++ b/Project/naive_approach/README.md @@ -1,29 +1,29 @@ -# naive_approach # +# naive_approach This directory contains the functions necessary to run the Naive Approach. Prerequisites: - # the file "emoji_descriptions_preprocessed.csv" has to be located in the specified folder ("../Tools") - # pandas has to be installed + * the file [emoji_descriptions_preprocessed.csv](../Tools/emoji_descriptions_preprocessed.csv) has to be located in the specified folder [../Tools](../Tools) + * pandas has to be installed -For testing, import naive_approach.py and execute the following commands: +For testing, import [naive_approach.py](naive_approach.py) and execute the following commands: -1. prepareData(stem, lower) - # preprocesses the emoji descriptions and returns a dictionary with the indexed emojis - # parameters: - # stem: Apply stemming (default=True) - # lower: Apply lowercasing (default=True) +1. `prepareData(stem, lower)` + * preprocesses the emoji descriptions and returns a dictionary with the indexed emojis + * parameters: + * `stem`: Apply stemming (default=`True`) + * `lower`: Apply lowercasing (default=`True`) -2. predict(sentence, lookup, emojis_to_consider, criteria, lang, embeddings, n=10, t=0.9) - # evaluates an input sentence and returns a list of predicted emojis - # parameters: - # sentence: Input sentence (required parameter) - # lookup: dictionary with emoji data (return value of prepareData, required parameter) - # emojis_to_consider: set of emojis to include in prediction, or "all" (default="all") - # criteria: criteria to evaluate the values of the description - message matching. - # options: "sum", "mean", "max_val", "threshold" (default: "threshold") - # lang: language to use (default: "eng") - # embeddings: word embeddings - # options: "wordnet", "word2Vec", "fastText", default: "wordnet" - # n: number of top ranked emojis to return (default=10) - # t: threshold for the "threshold" criteria (default=0.9) \ No newline at end of file +2. `predict(sentence, lookup, emojis_to_consider, criteria, lang, embeddings, n=10, t=0.9)` + * evaluates an input sentence and returns a list of predicted emojis + * parameters: + * `sentence`: Input sentence (required parameter) + * `lookup`: dictionary with emoji data (return value of prepareData, required parameter) + * `emojis_to_consider`: set of emojis to include in prediction, or `"all"` (default=`"all"`) + * `criteria`: criteria to evaluate the values of the description - message matching. + * options: `"sum"`, `"mean"`, `"max_val"`, `"threshold"` (default: `"threshold"`) + * `lang`: language to use (default: "eng") + * `embeddings`: word embeddings + * options: `"wordnet"`, `"word2Vec"`, `"fastText"`, default: `"wordnet"` + * `n`: number of top ranked emojis to return (default=`10`) + * `t`: threshold for the `"threshold"` criteria (default=`0.9`) \ No newline at end of file