Uses of Class
org.apache.tika.ml.junkdetect.BigramTables
Packages that use BigramTables
-
Uses of BigramTables in org.apache.tika.ml.junkdetect
Methods in org.apache.tika.ml.junkdetect that return BigramTablesModifier and TypeMethodDescriptionstatic BigramTablesBigramTables.readFrom(DataInputStream dis) Inverse ofBigramTables.writeTo(DataOutputStream).Methods in org.apache.tika.ml.junkdetect with parameters of type BigramTablesModifier and TypeMethodDescriptionstatic intJunkDetector.codepointToIndex(BigramTables tables, int cp) Binary-search a codepoint in the script's index.static doubleJunkDetector.computeF1MeanLogP(int[] cps, BigramTables tables) Codepoint-array form ofJunkDetector.computeF1MeanLogP(String, BigramTables).static doubleJunkDetector.computeF1MeanLogP(String text, BigramTables tables) Mean log-prob over the codepoint pairs intextusing the given script's bigram tables.Method parameters in org.apache.tika.ml.junkdetect with type arguments of type BigramTablesModifier and TypeMethodDescriptionJunkDetector.bucketSumsAndCounts(int[] cps, Map<String, BigramTables> tablesByScript) Per-script{sumLogP, count}buckets for a codepoint sequence, scored with the given per-script tables. -
Uses of BigramTables in org.apache.tika.ml.junkdetect.tools
Methods in org.apache.tika.ml.junkdetect.tools that return BigramTablesModifier and TypeMethodDescriptionstatic BigramTablesTrainJunkModel.buildBigramTablesFromCounts(HashMap<Long, long[]> pairCounts, HashMap<Integer, long[]> unigramCounts, long unigramTotal, int minBigramCount, double loadFactor, int keyIndexBits) Builds theBigramTablescarrier from pre-tallied pair/unigram counts.static BigramTablesTrainJunkModel.trainBigramTablesForScript(Path trainFile, int minBigramCount, double loadFactor, int keyIndexBits) Builds theBigramTablescarrier for the dominant script bucket of one*.train.gzfile.Method parameters in org.apache.tika.ml.junkdetect.tools with type arguments of type BigramTablesModifier and TypeMethodDescriptionstatic float[]TrainJunkModel.calibrateBucketScript(Path file, String script, Map<String, BigramTables> tables) Bucket-model z1 calibration {mu, sigma} for one script, sampling windows fromfileand taking that script's bucket mean log-prob per window (the inference z1 input).static voidTrainJunkModel.saveModel(TreeMap<String, BigramTables> f1Tables, TreeMap<String, float[]> f1Calibrations, float[] blockTable, float[] blockCal, float[] controlCal, float[] combinerWeights, List<String> scriptBuckets, float[] scriptTransTable, float[] scriptTransCal, Path output) Writes a model file in the current binary format.