|
| IndexedPatternPointerModel (IndexedCorpus *corpus) |
|
| IndexedPatternPointerModel (std::istream *f, const PatternModelOptions options, PatternModelInterface *constrainmodel=NULL, IndexedCorpus *corpus=NULL) |
|
| IndexedPatternPointerModel (const std::string filename, const PatternModelOptions options, PatternModelInterface *constrainmodel=NULL, IndexedCorpus *corpus=NULL) |
|
int | getmodeltype () const |
|
int | getmodelversion () const |
|
void | add (const PatternPointer &patternpointer, const IndexReference &ref) |
|
void | add (const PatternPointer &patternpointer, IndexedData *value, const IndexReference &ref) |
|
| IndexedPatternModel (IndexedCorpus *corpus=NULL) |
|
| IndexedPatternModel (std::istream *f, const PatternModelOptions options, PatternModelInterface *constrainmodel=NULL, IndexedCorpus *corpus=NULL) |
|
| IndexedPatternModel (const std::string filename, const PatternModelOptions options, PatternModelInterface *constrainmodel=NULL, IndexedCorpus *corpus=NULL) |
|
virtual | ~IndexedPatternModel () |
|
int | getmodeltype () const |
|
int | getmodelversion () const |
|
virtual void | add (const Pattern &pattern, IndexedData *value, const IndexReference &ref) |
|
IndexedData * | getdata (const Pattern &pattern, bool makeifnew=false) |
|
IndexedData * | getdata (const PatternPointer &pattern, bool makeifnew=false) |
|
virtual void | train (std::istream *in, PatternModelOptions options, PatternModelInterface *constrainbymodel=NULL, bool continued=false, uint32_t firstsentence=1, bool ignoreerrors=false) |
|
virtual void | train (const std::string &filename, PatternModelOptions options, PatternModelInterface *constrainbymodel=NULL, bool continued=false, uint32_t firstsentence=1, bool ignoreerrors=false) |
|
void | info (std::ostream *OUT) |
|
void | print (std::ostream *out, ClassDecoder &decoder) |
|
void | print (std::ostream *out, ClassDecoder &decoder, const PatternPointer &pattern, bool endline=true) |
|
virtual void | trainskipgrams (PatternModelOptions options, PatternModelInterface *constrainbymodel=NULL) |
|
Pattern | getpatternfromtoken (IndexReference ref) |
|
t_relationmap | getskipcontent (const PatternPointer &pattern) |
|
void | prunerelations (t_relationmap &relations, unsigned int occurrencethreshold) |
|
t_relationmap | gettemplates (const Pattern &pattern, unsigned int occurrencethreshold=0) |
|
t_relationmap | getinstances (const Pattern &pattern, unsigned int occurrencethreshold=0) |
|
t_relationmap | getsubchildren (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0) |
|
t_relationmap | getsubparents (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0) |
|
t_relationmap | getleftneighbours (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0, unsigned int cutoff=0) |
|
t_relationmap | getrightneighbours (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0, unsigned int cutoff=0) |
|
int | pruneskipgrams (int threshold, int minskiptypes, int _n=0) |
|
virtual void | computecoveragestats (int category=0, int n=0) |
|
t_relationmap | getrightcooc (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0, IndexedData *matches=NULL) |
|
t_relationmap | getleftcooc (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0) |
|
t_relationmap | getcooc (const PatternPointer &pattern, unsigned int occurrencethreshold=0, int category=0, unsigned int size=0, bool ordersignificant=false) |
|
double | npmi (const PatternPointer &key1, const PatternPointer &key2, int jointcount) |
|
void | outputrelations (const PatternPointer &pattern, t_relationmap &relations, ClassDecoder &classdecoder, std::ostream *OUT, const std::string label="RELATED-TO") |
|
void | outputrelations (const PatternPointer &pattern, ClassDecoder &classdecoder, std::ostream *OUT, bool outputheader=true) |
|
void | computenpmi (std::map< PatternPointer, t_relationmap_double > &coocmap, double threshold, bool right=true, bool left=true) |
|
void | computecooc (std::map< PatternPointer, t_relationmap > &coocmap, int threshold, bool right=true, bool left=true) |
|
int | computeflexgrams_fromskipgrams () |
|
int | computeflexgrams_fromcooc (double threshold) |
|
void | outputcooc_npmi (std::ostream *OUT, ClassDecoder &classdecoder, double threshold) |
|
void | outputcooc (std::ostream *OUT, ClassDecoder &classdecoder, double threshold) |
|
int | flexgramsize (const Pattern &pattern, IndexReference begin) |
|
| PatternModel (IndexedCorpus *corpus=NULL) |
|
| PatternModel (std::istream *f, PatternModelOptions options, PatternModelInterface *constrainmodel=NULL, IndexedCorpus *corpus=NULL) |
|
| PatternModel (const std::string &filename, const PatternModelOptions &options, PatternModelInterface *constrainmodel=NULL, IndexedCorpus *corpus=NULL) |
|
| ~PatternModel () |
|
virtual size_t | size () const |
|
virtual bool | has (const Pattern &pattern) const |
|
virtual bool | has (const PatternPointer &pattern) const |
|
virtual void | load (std::string &filename, const PatternModelOptions &options, PatternModelInterface *constrainmodel=NULL) |
|
virtual void | load (std::istream *f, const PatternModelOptions &options, PatternModelInterface *constrainmodel=NULL) |
|
PatternModelInterface * | getinterface () |
|
virtual int | computeskipgrams (const PatternPointer &pattern, int mintokens=2, const IndexReference *singleref=NULL, const IndexedData *multiplerefs=NULL, PatternModelInterface *constrainbymodel=NULL, std::vector< PatternPointer > *targetcontainer=NULL, const bool exhaustive=false, const int maxskips=3, const bool DEBUG=false) |
|
virtual int | computeskipgrams (const PatternPointer &pattern, PatternModelOptions &options, const IndexReference *singleref=NULL, const IndexedData *multiplerefs=NULL, PatternModelInterface *constrainbymodel=NULL, const bool exhaustive=false) |
|
virtual std::vector< PatternPointer > | findskipgrams (const PatternPointer &pattern, unsigned int occurrencethreshold=1, int maxskips=3) |
|
void | test (MapType &target, std::istream *in) |
|
void | write (std::ostream *out) |
|
void | write (const std::string filename) |
|
virtual int | maxlength () const |
|
virtual int | minlength () const |
|
virtual unsigned int | occurrencecount (const Pattern &pattern) |
|
virtual unsigned int | occurrencecount (const PatternPointer &pattern) |
|
virtual unsigned int | types () |
|
virtual unsigned int | tokens () const |
|
unsigned char | type () const |
|
unsigned char | version () const |
|
void | output (std::ostream *) |
|
unsigned int | coveragecount (const Pattern &key) |
|
double | coverage (const Pattern &key) |
|
std::vector< PatternPointer > | getreverseindex (const IndexReference ref, int occurrencecount=0, int category=0, unsigned int size=0) |
|
std::vector< std::pair< IndexReference, PatternPointer > > | getreverseindex_bysentence (int sentence) |
|
std::vector< std::pair< IndexReference, PatternPointer > > | getreverseindex_right (const IndexReference ref) |
|
std::vector< std::pair< IndexReference, PatternPointer > > | getreverseindex_left (const IndexReference ref) |
|
void | computestats () |
|
virtual void | resetstats () |
|
unsigned int | totaloccurrencesingroup (int category, int n) |
|
unsigned int | totalpatternsingroup (int category, int n) |
|
unsigned int | totalwordtypesingroup (int category, int n) |
|
unsigned int | totaltokensingroup (int category, int n) |
|
double | frequency (const Pattern &pattern) |
|
unsigned int | prune (int threshold, int _n=0) |
|
virtual unsigned int | pruneskipgrams (unsigned int threshold, int minskiptypes=2, int _n=0) |
|
unsigned int | prunenotinset (const std::unordered_set< Pattern > &s, int _n) |
|
unsigned int | prunebymodel (PatternModel< ValueType2, ValueHandler2, MapType2 > &secondmodel) |
|
std::vector< std::pair< Pattern, int > > | getpatterns (const Pattern &pattern) |
|
virtual void | printreverseindex (std::ostream *out, ClassDecoder &decoder) |
|
void | printmodel (std::ostream *out, ClassDecoder &decoder) |
|
void | printpattern (std::ostream *out, ClassDecoder &decoder, const Pattern &pattern, bool endline=true) |
|
void | histogram (std::map< unsigned int, unsigned int > &hist, unsigned int threshold=0, unsigned int cap=0, int category=0, unsigned int size=0) |
|
void | histogram (std::ostream *OUT, unsigned int threshold=0, unsigned int cap=0, int category=0, unsigned int size=0) |
|
unsigned int | topthreshold (int amount, int category=0, int size=0) |
|
void | info (std::ostream *OUT) |
|
void | report (std::ostream *OUT) |
|
PatternSet< uint64_t > | extractset (int minlength=1, int maxlength=1) |
|
virtual void | outputrelations (const Pattern &pattern, ClassDecoder &classdecoder, std::ostream *OUT) |
|
virtual t_relationmap | getsubchildren (const Pattern &pattern, int=0, int=0, int=0) |
|
virtual t_relationmap | getsubparents (const Pattern &pattern, int=0, int=0, int=0) |
|
virtual t_relationmap | gettemplates (const Pattern &pattern, int=0) |
|
virtual t_relationmap | getinstances (const Pattern &pattern, int=0) |
|
virtual t_relationmap | getleftneighbours (const Pattern &pattern, int=0, int=0, int=0, int=0) |
|
virtual t_relationmap | getrightneighbours (const Pattern &pattern, int=0, int=0, int=0, int=0) |
|
virtual t_relationmap_double | getnpmi (const Pattern &pattern, double threshold) |
|
virtual int | computeflexgrams_fromcooc () |
|
virtual PatternStoreInterface * | getstoreinterface () |
|
virtual PatternStoreInterface * | getstoreinterface () |
|