input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public object get meta data value string meta data key pair object integer pair meta data get meta data key if pair null return pair get first return null
|
returns the value of this meta data or null if not existent
|
public void set append unkown words boolean append words this append words append words
|
sets the append words
|
public void prune by absolute frequency int min int max iterator word list entry e entries iterator while e has next word list entry current word e next if current word get document frequency min current word get document frequency max e remove word map remove current word get word
|
prune the word list by document frequencies
|
public void prune by relative frequency double min percentage double max percentage int min frequency int number of documents min percentage 100 int max frequency int number of documents max percentage 100 prune by absolute frequency min frequency max frequency
|
prune the word list by relative document frequencies
|
public string get word int index return entries get index get word
|
returns the word list entry with the given index
|
public void sort collections sort entries new comparator word list entry override public int compare word list entry o1 word list entry o2 return o1 get word compare to o2 get word
|
this sorts the list
|
protected memory example table get target example table throws user error return new memory example table new linked list attribute
|
subclasses might override this method if the supply a different table
|
public string stem string word normalize word char c word to char array int len c length len arabic norm normalize c len char normalized word new char len for int i 0 i len i normalized word i c i stem the normalized word len ara light stemmer stem normalized word len char light word new char len for int i 0 i len i light word i normalized word i string buffer sbuf new string buffer sbuf append light word return sbuf to string
|
returns the stemmed version of the given word
|
public string stem string word return khoja format word word
|
returns the stemmed version of the given word
|
public string stem string word if word length 2 return recode ending remove ending word to lower case return word to lower case
|
returns the stemmed version of the given word
|
public void set current string value current replace 0 current length value cursor 0 limit current length limit backward 0 bra cursor ket limit
|
set the current string
|
public string get current string result current to string make a new string buffer if we reuse the old one and a user of the library keeps a reference to the buffer returned for example by converting it to a string in a way which doesn t force a copy the buffer size will not decrease and we will risk wasting a large amount of memory thanks to wolfram esser for spotting this problem current new string buffer return result
|
get the current string
|
private document remove cdata document dom iterator it dom get descendants new filter private static final long serial version uid 23984623871 l override public boolean matches object obj return obj instanceof cdata while it has next it next it remove return dom
|
this method just removes all cdata elements from the dom tree
|
private void add tokens mime multipart multipart list token tokens throws messaging exception ioexception for int i 0 i multipart get count i body part part multipart get body part i object content part get content if content instanceof mime multipart add tokens mime multipart content tokens else if content instanceof string tokens add new token string content 1f
|
recursively adds parts as tokens
|
public void add occurance float weight current document count weight
|
add an occurrence of the word for the document currently processed
|
public float get current document frequency return current document count
|
return the frequency for the current document
|
public int get document frequency return document count
|
return the document frequency for this word
|
public float get class frequency int class value if classes are supported and the class value is valid return actual value if label count null if class value 0 class value label count length return label count class value otherwise return 0 return 0f
|
return the class frequency of this word for a given class
|
public void add word occurance string word float weight try to find it with the hash word list entry entry word map get word if not found and new words should be added add it if entry null append words if number of classes 0 entry new word list entry word number of classes else entry new word list entry word word map put word entry entries add entry if entry null entry add occurance weight
|
count the occurrences of the given word
|
private document remove cdata document dom iterator it dom get descendants new filter private static final long serial version uid 23984623871 l public boolean matches object obj return obj instanceof cdata while it has next it next it remove return dom
|
this method just removes all cdata elements from the dom tree
|
public void set int index double value if index data length double new data new double index 1 system arraycopy data 0 new data 0 size data new data if index size size index 1 data index value
|
this method sets the index to the given value
|
public double get int index if index size return data index throw new index out of bounds exception
|
this returns the value at specified index
|
public void add double value if size data length double new data new double data length 2 system arraycopy data 0 new data 0 size data new data data size value size
|
this allows to append a value to this array
|
public void set int index int value if index data length int new data new int index 1 system arraycopy data 0 new data 0 size data new data if index size size index 1 data index value
|
this method sets the index to the given value
|
public int get int index if index size return data index throw new index out of bounds exception
|
this returns the value at specified index
|
public void add int value if size data length int new data new int data length 2 system arraycopy data 0 new data 0 data length data new data data size value size
|
this allows to append a value to this array
|
public void replace first string regex string replacement todo implement throw new unsupported operation exception not implemented yet
|
replaces the first substring of this string that matches the given a
|
public void replace all string regex string replacement todo implement throw new unsupported operation exception not implemented yet
|
replaces each substring of the documents text that matches the given a
|
private void update indices list document replacement replacements for annotation layer layer annotation layers layer update indices replacements
|
this method will correct all annotation layer indices to match the performed replacements
|
public annotation layers get annotation layers return annotation layers
|
this returns the
|
protected string get missing value treatment return as is
|
this returns the missing value treatment of the exported object
|
protected string get missing value replacement attribute attribute return null
|
this returns the replacement for missing values if an appropriate missing value treatment
|
public void add feature feature new feature features add new feature
|
adds the given feature in the collection to the given list
|
public void add features collection feature new features features add all new features
|
adds all features in the collection to the given list
|
public double get amplitude return amplitude
|
returns the amplitude of this peak
|
public void add features feature new features for int i 0 i new features length i features add new features i
|
adds all features in the array to the given list
|
public feature get feature int index return features get index
|
returns the feature with the given index
|
public double get index point return index point
|
returns the index point of this peak
|
public feature get first feature return features get first
|
returns the first feature
|
public int compare to non zero value a if math abs this amplitude math abs a amplitude return 1 else if math abs this amplitude math abs a amplitude return 1 else return 0
|
returns 1 if this peak us higher
|
public feature get last feature return features get last
|
returns the last feature
|
public void set series value series data series this series series
|
sets the series e
|
public value series data get series data return series
|
returns the current series
|
public void merge value series series io this features add all series io features
|
adds the features of the given value series to this value series
|
public int compare to peak a if this amplitude a amplitude return 1 else if this amplitude a amplitude return 1 else return 0
|
returns 1 if this peak is higher
|
private void add features for regression value series data series int index regression regression list feature features features add new feature lin piece index reg gradient series get name regression get gradient features add new feature lin piece index axis interc series get name regression get axis interception features add new feature lin piece index discrepancy series get name regression get discrepancy
|
converts the regression lines to features
|
public void change parameter int function random generator get global random generator next int functions length get parameters set parameter function type function
|
changes the combining function
|
public void set weights double w weights new double w length double sum 0 0 for int i 0 i w length i sum w i for int i 0 i w length i weights i w i sum
|
sets the weights of this average
|
public void change parameter int dimension random generator get global random generator next int dimensions length get parameters set parameter without check dimension new integer dimension boolean weight random generator get global random generator next boolean get parameters set parameter without check weight with strength new boolean weight
|
changes the average type
|
private void set weights string arguments double w new double arguments length for int i 0 i w length i w i double parse double arguments i set weights w
|
sets the weights of this average
|
public void change parameter int mean type random generator get global random generator next int means length get parameters set parameter mean type mean type
|
changes the average type
|
public boolean is usable for automatic preprocessing return true
|
since the combined function is usable in automatic approaches this method returns true
|
public double length return math sqrt real real imaginary imaginary
|
returns the length of the vector representation of this complex number
|
public double get absolute value return length
|
returns the absolute value of the vector representation of this complex number
|
public double get argument return math atan2 imaginary real
|
returns the argument of the vector representation of this complex number
|
public complex get conjugated complex return new complex this real this imaginary
|
returns the conjugated complex number
|
public int get value dimension return value dimension
|
returns the current value dimension
|
public complex difference complex a return new complex this real a real this imaginary a imaginary
|
builds the difference of this and the given complex number
|
public complex multiply complex a return new complex this real a real this imaginary a imaginary this real a imaginary a real this imaginary
|
multiplies this number with the given complex number
|
public double get distance double value return math abs centroid value
|
returns the distance between the given values and the clusters centroid
|
public void set value dimension int dimension this value dimension dimension
|
sets the current dimension of values in the multivariate case
|
public void scale double scalar this real scalar this imaginary scalar
|
scales the complex number so that its length is scaled properly
|
public void reinit cluster this start double positive infinity this end double negative infinity this sum values 0 0 this number of values 0
|
reinits the cluster before each iteration
|
public void add value double value sum values value number of values if value this start this start value if value this end this end value
|
adds a value to this cluster
|
public void set complex value type int complex value type this complex value type complex value type
|
sets part of each complex number should be used real imaginary or length
|
public boolean recalculate centroid if number of values 0 return true else double old centroid centroid this centroid sum values number of values return old centroid centroid
|
calculates the new centroid
|
public int get number of values return number of values
|
returns the number of values
|
public int get complex value type return this complex value type
|
returns which part of each complex number should be used
|
public int compare to cluster c return double compare this start c start
|
compares two clusters
|
public int length return series length
|
returns the number of vectors of this series
|
public int get number of dimensions if series length 0 return 0 else return series 0 get number of dimensions
|
returns the dimension of the values of the series
|
public double get value int index return get value index value dimension
|
returns the value at the given index
|
private void reinit clusters cluster clusters for int i 0 i clusters length i clusters i reinit cluster
|
reinits the given clusters
|
public double get value int index int dimension switch this complex value type case complex real type return series index get value dimension get real case complex imaginary type return series index get value dimension get imaginary case complex length type return series index get value dimension length default return double na n
|
returns the value at the given index
|
private void cluster value series data series cluster clusters for int i 0 i series length i double value get value series i cluster smallest clusters 0 for int j 1 j clusters length j if clusters j get distance value smallest get distance value smallest clusters j smallest add value value
|
performs one cluster step
|
public complex get complex int index return get complex index value dimension
|
returns the complex of the given index in the code value dimension code
|
private double get value value series data series int index point switch dimension case displacement dimension return series get displacement index point case value dimension default return series get value index point
|
returns the value for the given index point
|
public complex get complex int index int dimension return series index get value dimension
|
returns the complex of the given index in the given dimension
|
public vector get vector int index return series index
|
returns the complete value vector of the given index
|
public string get markup type return markup type
|
returns the markup type
|
private int get type double start value double start index double current value double current index double norm factor double improvement current value start value current index start index if improvement norm factor 3 return strong decreasing if improvement norm factor 3 improvement norm factor 1 return decreasing if improvement norm factor 1 improvement norm factor 1 return equal values if improvement norm factor 1 improvement norm factor 3 return increasing if improvement norm factor 3 return strong increasing return equal values
|
returns the type for the given value configuration
|
public double get displacement int index return displacements index
|
returns the displacement value of the given index
|
public value series data transform value series data series throws operator exception int length get parameter as int length if length 1 throw new operation exception cannot transform series length is smaller than 1 vector result new vector length double displacements new double length for int i 0 i length i if i series length result i series get vector series length length i displacements i series get displacement series length length i else throw new operation exception cannot generate the i th value data too short return new value series data last length series get name displacements result series
|
generates the k last values of the series as new series
|
public double get type return type
|
returns the type of this interval
|
public double get strength return strength
|
returns the strength of this interval
|
public void add dimension value series data new series if length new series length throw new runtime exception incompatible series lengths cannot add new dimension for int i 0 i length i series i series i add dimension new series get complex i
|
adds the values of the series to this series
|
public void set start double start this start start
|
sets the start of this interval
|
public double get average distance return average distance
|
returns the average distance of two index points in the series
|
public void set end double end this end end
|
sets the end of this interval
|
public double get length return end start
|
returns the length of the interval i
|
public double get maximum value double result double negative infinity for int i 0 i length i if get value i result result get value i return result
|
returns the maximum value of this series i
|
public double get minimum value double result double positive infinity for int i 0 i length i if get value i result result get value i return result
|
returns the minimum value of this series i
|
public double get distance interval interval boolean reciprocal weights if interval get type type return double na n else todo negative distances probably a better way math max 0 distance double weight interval strength strength if weight 0 0d if reciprocal weights weight 1 0d else weight 1 0d double distance weight math min interval end end math max interval start start return distance
|
returns the distance between the intervals
|
private double convert frequency double frequency int nyquist int total length return frequency 2 0d double total length double nyquist
|
normalizes the frequency to the correct value
|
public double get distance int index1 int index2 vector vector1 series index1 add dimension new complex displacements index1 vector vector2 series index2 add dimension new complex displacements index2 vector length vector vector1 difference vector2 return length vector length
|
returns the distance between the vectors of the given indices
|
public void add markup string markup name markup markup if markups get markup name null markups remove markup name markups put markup name markup
|
adds a markup with the given name for this series
|
public value series data transform value series data series throws operator exception return change basis series
|
invokes the interface method change basis value series
|
public markup get markup string markup name return markups get markup name
|
returns the desired markup of null if no markup with this name exists
|
public int get number of markups return markups size
|
returns the number of different markups in this series
|
private double skalar pnorm cos value series data ampl time array int pos double result 0 0d double length 0 0d double delta 2 math pi ampl time array length for int i 0 i ampl time array length i double cos math cos pos i delta result ampl time array get value i cos length cos cos return result length
|
calculates the result of the normalized skalar product
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.