00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef CONSTANTS_H_
00044 #define CONSTANTS_H_
00045 #include "types.h"
00046
00047
00048
00049
00050 static const double CURRENT_VERSION = 1.1;
00051
00052
00053 static const size_t NUM_SAMPLERS = 50000;
00054
00055
00056
00057
00058 static const size_t EXP_NUM_WORDS_PER_DOC = 1000;
00059
00060 static const size_t BITS_PER_BYTE = 8;
00061
00062
00063
00064 static const size_int MAX_MSG_SIZE = 10000000;
00065
00066
00067 static const int PRT_CNT_INTERVAL = 50000;
00068
00069
00070 static const double ALPHA_SUM = 50.;
00071
00072
00073 static const double BETA = 0.01;
00074
00075
00076 static const double GAMMA = 0.01;
00077
00078
00079 static const double DELTA = 0.01;
00080
00081
00082
00083 static const double MIN_ALPHA = 0.01;
00084
00085 static const word_t NUM_WORDS_PER_TOP = 20;
00086
00087 static const word_t NUM_TOPICS_PER_DOC = 10;
00088
00089 static const word_t MAX_MSGS = 10;
00090
00091
00092
00093
00094
00095
00096 static const uint16_t NUM_RNGS = 32;
00097
00098
00099 static const uint16_t RNG_MASK = (1 << 5) - 1;
00100
00101
00102
00103 static const uint64_t MAX_MEMORY_USAGE = ((uint64_t) 1) << 34;
00104
00105
00106
00107
00108
00109 static const uint32_t WARN_MEMORY_SIZE = 1 << 31;
00110
00111
00112
00113
00114 static const uint16_t LOCK_MAX_TRIES = 60;
00115
00116
00117
00118
00119 static const uint16_t INIT_COM_MAX_TRIES = 60;
00120
00121
00122
00123 static const time_t LOCK_EXPIRY_TIME = 10;
00124
00125
00126
00127
00128 static const uint16_t REACQUIRE_BUFFER = 2;
00129
00130
00131 static const std::string stopwords[] = { "a", "able", "about", "above",
00132 "according", "accordingly", "across", "actually", "after",
00133 "afterwards", "again", "against", "all", "allow", "allows", "almost",
00134 "alone", "along", "already", "also", "although", "always", "am",
00135 "among", "amongst", "an", "and", "another", "any", "anybody", "anyhow",
00136 "anyone", "anything", "anyway", "anyways", "anywhere", "apart",
00137 "appear", "appreciate", "appropriate", "are", "around", "as", "aside",
00138 "ask", "asking", "associated", "at", "available", "away", "awfully",
00139 "b", "be", "became", "because", "become", "becomes", "becoming",
00140 "been", "before", "beforehand", "behind", "being", "believe", "below",
00141 "beside", "besides", "best", "better", "between", "beyond", "both",
00142 "brief", "but", "by", "c", "came", "can", "cannot", "cant", "cause",
00143 "causes", "certain", "certainly", "changes", "clearly", "co", "com",
00144 "come", "comes", "concerning", "consequently", "consider",
00145 "considering", "contain", "containing", "contains", "corresponding",
00146 "could", "course", "currently", "d", "definitely", "described",
00147 "despite", "did", "different", "do", "does", "doing", "done", "down",
00148 "downwards", "during", "e", "each", "edu", "eg", "eight", "either",
00149 "else", "elsewhere", "enough", "entirely", "especially", "et", "etc",
00150 "even", "ever", "every", "everybody", "everyone", "everything",
00151 "everywhere", "ex", "exactly", "example", "except", "f", "far", "few",
00152 "fifth", "first", "five", "followed", "following", "follows", "for",
00153 "former", "formerly", "forth", "four", "from", "further",
00154 "furthermore", "g", "get", "gets", "getting", "given", "gives", "go",
00155 "goes", "going", "gone", "got", "gotten", "greetings", "h", "had",
00156 "happens", "hardly", "has", "have", "having", "he", "hello", "help",
00157 "hence", "her", "here", "hereafter", "hereby", "herein", "hereupon",
00158 "hers", "herself", "hi", "him", "himself", "his", "hither",
00159 "hopefully", "how", "howbeit", "however", "i", "ie", "if", "ignored",
00160 "immediate", "in", "inasmuch", "inc", "indeed", "indicate",
00161 "indicated", "indicates", "inner", "insofar", "instead", "into",
00162 "inward", "is", "it", "its", "itself", "j", "just", "k", "keep",
00163 "keeps", "kept", "know", "knows", "known", "l", "last", "lately",
00164 "later", "latter", "latterly", "least", "less", "lest", "let", "like",
00165 "liked", "likely", "little", "look", "looking", "looks", "ltd", "m",
00166 "mainly", "many", "may", "maybe", "me", "mean", "meanwhile", "merely",
00167 "might", "more", "moreover", "most", "mostly", "much", "must", "my",
00168 "myself", "n", "name", "namely", "nd", "near", "nearly", "necessary",
00169 "need", "needs", "neither", "never", "nevertheless", "new", "next",
00170 "nine", "no", "nobody", "non", "none", "noone", "nor", "normally",
00171 "not", "nothing", "novel", "now", "nowhere", "o", "obviously", "of",
00172 "off", "often", "oh", "ok", "okay", "old", "on", "once", "one", "ones",
00173 "only", "onto", "or", "other", "others", "otherwise", "ought", "our",
00174 "ours", "ourselves", "out", "outside", "over", "overall", "own", "p",
00175 "particular", "particularly", "per", "perhaps", "placed", "please",
00176 "plus", "possible", "presumably", "probably", "provides", "q", "que",
00177 "quite", "qv", "r", "rather", "rd", "re", "really", "reasonably",
00178 "regarding", "regardless", "regards", "relatively", "respectively",
00179 "right", "s", "said", "same", "saw", "say", "saying", "says", "second",
00180 "secondly", "see", "seeing", "seem", "seemed", "seeming", "seems",
00181 "seen", "self", "selves", "sensible", "sent", "serious", "seriously",
00182 "seven", "several", "shall", "she", "should", "since", "six", "so",
00183 "some", "somebody", "somehow", "someone", "something", "sometime",
00184 "sometimes", "somewhat", "somewhere", "soon", "sorry", "specified",
00185 "specify", "specifying", "still", "sub", "such", "sup", "sure", "t",
00186 "take", "taken", "tell", "tends", "th", "than", "thank", "thanks",
00187 "thanx", "that", "thats", "the", "their", "theirs", "them",
00188 "themselves", "then", "thence", "there", "thereafter", "thereby",
00189 "therefore", "therein", "theres", "thereupon", "these", "they",
00190 "think", "third", "this", "thorough", "thoroughly", "those", "though",
00191 "three", "through", "throughout", "thru", "thus", "to", "together",
00192 "too", "took", "toward", "towards", "tried", "tries", "truly", "try",
00193 "trying", "twice", "two", "u", "un", "under", "unfortunately",
00194 "unless", "unlikely", "until", "unto", "up", "upon", "us", "use",
00195 "used", "useful", "uses", "using", "usually", "uucp", "v", "value",
00196 "various", "very", "via", "viz", "vs", "w", "want", "wants", "was",
00197 "way", "we", "welcome", "well", "went", "were", "what", "whatever",
00198 "when", "whence", "whenever", "where", "whereafter", "whereas",
00199 "whereby", "wherein", "whereupon", "wherever", "whether", "which",
00200 "while", "whither", "who", "whoever", "whole", "whom", "whose", "why",
00201 "will", "willing", "wish", "with", "within", "without", "wonder",
00202 "would", "would", "x", "y", "yes", "yet", "you", "your", "yours",
00203 "yourself", "yourselves", "z", "zero" };
00204
00205
00206 static const uint16_t NUM_STP_WRDS = sizeof(stopwords) / sizeof(stopwords[0]);
00207
00208 #endif