Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dachev/node-cld
/ functions
Functions
252 in github.com/dachev/node-cld
⨍
Functions
252
◇
Types & classes
121
↓ 27 callers
Method
Value
chromium/encodings/compact_lang_det/tote.h:29
↓ 25 callers
Method
Key
chromium/encodings/compact_lang_det/tote.h:28
↓ 22 callers
Function
UnpackLanguage
chromium/encodings/compact_lang_det/cldutil.h:1188
↓ 19 callers
Function
ExtLanguageCode
Given the Language, return the language code, e.g. "ko"
chromium/encodings/compact_lang_det/ext_lang_enc.cc:268
↓ 14 callers
Method
Add
Three-way associative, guaranteeing that the largest two counts are always in the data structure. kMaxSize must be a multiple of 3, and is tied to the
chromium/encodings/compact_lang_det/tote.cc:50
↓ 14 callers
Function
PackLanguage
Make languages packed into uint32 values non-zero These routines later could remap so languages not in QuadHash tables are not represented, and so tha
chromium/encodings/compact_lang_det/cldutil.h:1185
↓ 13 callers
Function
strcasecmp
Compare the two strings s1 and s2 without regard to case using the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if s2 > s1 accord
chromium/base/string_util.h:18
↓ 12 callers
Function
LgProb3
Return one of three probabilities in an entry
chromium/encodings/compact_lang_det/cldutil.h:996
↓ 11 callers
Function
ExtLanguageName
Given the Language, returns its string name used as the output by the lang/enc identifier, e.g. "Korean" "invalid_language" if the input is invalid. T
chromium/encodings/compact_lang_det/ext_lang_enc.cc:235
↓ 10 callers
Method
get
chromium/base/scoped_ptr.h:84
↓ 8 callers
Method
Reliability
chromium/encodings/compact_lang_det/tote.h:69
↓ 8 callers
Method
SetValue
chromium/encodings/compact_lang_det/tote.h:33
↓ 7 callers
Method
MaxSize
chromium/encodings/compact_lang_det/tote.h:27
↓ 6 callers
Method
SetReliability
chromium/encodings/compact_lang_det/tote.h:73
↓ 6 callers
Method
get
Returns pointer to the normalized text.
chromium/encodings/compact_lang_det/win/normalizedunicodetext.h:42
↓ 6 callers
Function
minint
------------------------------------------------------------------------------ General ---------------------------------------------------------------
chromium/encodings/compact_lang_det/cldutil.h:960
↓ 5 callers
Function
IsValidLanguage
IsValidLanguage =============== Function to check if the input is within range of the Language enum. If IsValidLanguage(lang) returns true, it is saf
chromium/languages/public/languages.h:62
↓ 5 callers
Function
OneCharLen
Return length of a single UTF-8 source character
chromium/encodings/compact_lang_det/win/cld_unilib_windows.cc:25
↓ 5 callers
Method
reset
Reset. Deletes the current owned object, if any. Then takes ownership of a new object, if given. this->reset(this->get()) works.
chromium/base/scoped_ptr.h:66
↓ 4 callers
Method
AddBytes
chromium/encodings/compact_lang_det/tote.h:20
↓ 4 callers
Method
IsValid
Returns true if all functions were bound successfully. This implies that library_ itself was loaded successfully.
chromium/encodings/compact_lang_det/win/normalizedunicodetext.cc:60
↓ 4 callers
Function
LgProb2TblEntry
Return address of 8-byte entry[i]
chromium/encodings/compact_lang_det/cldutil.h:985
↓ 4 callers
Function
ScoreChunkIntoDoc
Add one chunk's score to running document score If the top language is UNKNOWN_LANGUAGE, score nothing. This is used to positively identify text to be
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1350
↓ 4 callers
Method
SetKey
chromium/encodings/compact_lang_det/tote.h:32
↓ 4 callers
Function
maxint
chromium/encodings/compact_lang_det/cldutil.h:961
↓ 3 callers
Method
AddGram
Increment count of quadgrams/trigrams/unigrams scored
chromium/encodings/compact_lang_det/tote.cc:33
↓ 3 callers
Function
EntityToBuffer
Src points to '&' Writes entity value to dst. Returns take(src), put(dst) byte counts
chromium/encodings/compact_lang_det/win/cld_htmlutils_google3.cc:19
↓ 3 callers
Function
IsSpecial
Returns true if character is < > or &
chromium/encodings/compact_lang_det/getonescriptspan.cc:187
↓ 3 callers
Function
LanguageFromCode
chromium/languages/internal/languages.cc:277
↓ 3 callers
Method
Reinit
chromium/encodings/compact_lang_det/tote.cc:24
↓ 3 callers
Method
Score
chromium/encodings/compact_lang_det/tote.h:68
↓ 3 callers
Method
Sort
Sort first n entries by decreasing order of value If key==0 other fields are not valid, treat value as -1
chromium/encodings/compact_lang_det/tote.cc:107
↓ 3 callers
Method
swap
Swap two scoped pointers.
chromium/base/scoped_ptr.h:93
↓ 2 callers
Function
CountPredictedBytes
This uses a cheap predictor to get a measure of compression, and hence a measure of repetitiveness. It works on complete UTF-8 characters instead of b
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:805
↓ 2 callers
Function
CountSpaces4
Counts number of spaces; a little faster than one-at-a-time Doesn't count odd bytes at end
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:849
↓ 2 callers
Method
CurrentTopKey
Return current top key
chromium/encodings/compact_lang_det/tote.cc:91
↓ 2 callers
Function
ExtractLangEtc
Extract return values before fixups
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1844
↓ 2 callers
Function
FlagFinish
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:743
↓ 2 callers
Function
FlagRepeats
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:745
↓ 2 callers
Function
FlagTop40
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:746
↓ 2 callers
Function
FlagUseWords
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:749
↓ 2 callers
Method
GetGramCount
chromium/encodings/compact_lang_det/tote.h:24
↓ 2 callers
Function
GetReferenceableValue
chromium/base/logging.h:438
↓ 2 callers
Function
InStateZero
Return true if current Tbl pointer is within state0 range Note that unsigned compare checks both ends of range simultaneously
chromium/encodings/compact_lang_det/win/cld_utf8statetable.cc:9
↓ 2 callers
Function
InitScriptToteLang
Start the tote with a count of one for the default language for script
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1668
↓ 2 callers
Function
IsEFIGS
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1956
↓ 2 callers
Function
IsFIGS
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1948
↓ 2 callers
Function
LScript4
Map script into Latin, Cyrillic, Arabic, Other. Used in keeping track of amount of training data for language-script combinations
chromium/encodings/compact_lang_det/cldutil.h:974
↓ 2 callers
Function
LanguageCode
chromium/languages/internal/languages.cc:234
↓ 2 callers
Function
LanguageName
chromium/languages/internal/languages.cc:214
↓ 2 callers
Method
NormalizeString
chromium/encodings/compact_lang_det/win/normalizedunicodetext.cc:48
↓ 2 callers
Function
OctaHash40Mix
OCTAGRAM Pick up 1..24 bytes plus pre/post space and hash them via mask/shift/add UNDERSHOOTS 1 byte, OVERSHOOTS up to 3 bytes The low 32 bits follow
chromium/encodings/compact_lang_det/cldutil.cc:225
↓ 2 callers
Function
PrintTopLangSpeculative
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1470
↓ 2 callers
Function
QuadHashV25Mix
QUADGRAM Pick up 1..12 bytes plus pre/post space and hash them via mask/shift/add OVERSHOOTS up to 3 bytes For runtime use of tables
chromium/encodings/compact_lang_det/cldutil.cc:155
↓ 2 callers
Function
QuadHashV3Lookup4
Look up 32-bit gram FP in caller-passed table Typical size 256K entries (1.5MB) Two-byte hashkey
chromium/encodings/compact_lang_det/cldutil.h:1039
↓ 2 callers
Function
ScanToLetterOrSpecial
Quick Skip to next letter or < > & or to end of string (eos) Always return is_letter for eos
chromium/encodings/compact_lang_det/getonescriptspan.cc:196
↓ 2 callers
Function
ScanToPossibleLetter
src points to non-letter, such as tag-opening '<' Return length from here to next possible letter On eos or another < before >, return 1 advances <tag
chromium/encodings/compact_lang_det/getonescriptspan.cc:218
↓ 2 callers
Function
ScoreChunkIntoDoc2
Add one chunk's score to running document score Convenience function with constant src text
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1484
↓ 2 callers
Function
strto32
This implementation is not as good as the one in base/strtoint.h, but it's sufficient for our purposes.
chromium/encodings/compact_lang_det/win/cld_strtoint.h:20
↓ 1 callers
Function
ApplyEncodingHint
Increment the initial probabilities based on a per-encoding probs entry
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1803
↓ 1 callers
Function
ApplyLanguageHint
Increment the initial probability for given language by fixed amount Does not recognize extended languages as hints
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1825
↓ 1 callers
Function
ApplyLanguageHints
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1302
↓ 1 callers
Function
ApplyTLDHint
Increment the initial probabilities based on a per-TLD probs entry
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1778
↓ 1 callers
Function
BackscanToSpace
Backscan to word boundary, returning how many bytes n to go back so that src - n is non-space ans src - n - 1 is space. If not found in kMaxSpaceScan
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:768
↓ 1 callers
Function
CalcSummaryLang
Calculate a single summary language for the document, and its reliability. Returns language3[0] or language3[1] or ENGLISH or UNKNOWN_LANGUAGE This is
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1984
↓ 1 callers
Function
CheapRepWordsInplace
Remove words of text that have more than half their letters predicted correctly by our cheap predictor, moving the remaining words in-place to the fro
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:872
↓ 1 callers
Function
CheapSqueezeTriggerTest
Timing 2.8GHz P4 (dsites 2008.03.20) with 170KB input About 90 MB/sec, with or without memcpy, chunksize 48 or 4096 Just CountSpaces is about 340 MB/s
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1056
↓ 1 callers
Function
EncodingName
We do not use it, just to please a compiler and minimize ported code changes.
chromium/encodings/internal/encodings.cc:10
↓ 1 callers
Method
Find
Find subscript of a given packed language, or -1
chromium/encodings/compact_lang_det/tote.cc:215
↓ 1 callers
Function
FlagSqueeze
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:744
↓ 1 callers
Function
ForwardscanToSpace
Forwardscan to word boundary, returning how many bytes n to go forward so that src + n is non-space ans src + n - 1 is space. If not found in kMaxSpac
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:781
↓ 1 callers
Method
GetByteCount
chromium/encodings/compact_lang_det/tote.h:26
↓ 1 callers
Method
GetIncrCount
chromium/encodings/compact_lang_det/tote.h:25
↓ 1 callers
Method
GetOneScriptSpanLower
Copy next run of same-script non-tag letters to buffer [NUL terminated] Force Latin and Cyrillic scripts to be lowercase
chromium/encodings/compact_lang_det/getonescriptspan.cc:558
↓ 1 callers
Function
GlobalEpoch
The global epoch is the least significant half of an Atomic32, and may only be accessed through atomic operations.
chromium/base/vlog_is_on.h:104
↓ 1 callers
Function
HintBinaryLookup4
Find subscript of matching key in first 4 bytes of sorted hint array, or -1
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1757
↓ 1 callers
Function
IS_LANGUAGE_UNKNOWN
Return true if the language is "unknown". (This function was previously a macro, hence the spelling in all caps.)
chromium/languages/public/languages.h:69
↓ 1 callers
Method
IsNormalizedString
Proxy functions for the ones loaded from DLL.
chromium/encodings/compact_lang_det/win/normalizedunicodetext.cc:42
↓ 1 callers
Function
MakeChar4
Normalize ASCII string to first 4 alphabetic/digit chars Letters are forced to lowercase ASCII Used to normalize TLD values
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1742
↓ 1 callers
Function
OctaFPJustHash
From 40-bit gram FP, return hash table subscript and remaining key
chromium/encodings/compact_lang_det/cldutil.h:1075
↓ 1 callers
Function
OctaHashV3Lookup4
Look up 40-bit gram FP in caller-passed table Typical size 256K-4M entries (1-16MB) 24-12 bit hashkey packed with 8-20 bit indirect lang/probs keymask
chromium/encodings/compact_lang_det/cldutil.h:1089
↓ 1 callers
Function
PrintHtmlEscapedText
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1323
↓ 1 callers
Function
PrintLangs
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1646
↓ 1 callers
Function
QuadFPJustHash
From 32-bit gram FP, return hash table subscript and remaining key
chromium/encodings/compact_lang_det/cldutil.h:1028
↓ 1 callers
Function
RefineScoredClosePairs
Move less likely byte count to more likely for close pairs of languages
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1244
↓ 1 callers
Function
RemoveExtendedLanguages
Delete any extended languages from doc_tote
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1100
↓ 1 callers
Function
RemoveUnreliableLanguages
Move bytes for unreliable langs to another lang or UNKNOWN doc_tote is sorted, so cannot Add If both CHINESE and CHINESET are present and unreliable,
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1133
↓ 1 callers
Function
ScoreNilgrams
Score one scriptspan using the only language for that script
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1497
↓ 1 callers
Function
ScoreQuadgrams
Score one scriptspan using quadgrams Incoming chunk_tote may have partial accumulation
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1589
↓ 1 callers
Function
ScoreUnigrams
Score one scriptspan using unigrams Updates tote_grams
chromium/encodings/compact_lang_det/compact_lang_det_impl.cc:1522
↓ 1 callers
Function
SiteEpoch
The least significant half of a site is the epoch.
chromium/base/vlog_is_on.h:109
↓ 1 callers
Function
SiteLevel
The most significant half of a site is the logging level.
chromium/base/vlog_is_on.h:112
↓ 1 callers
Function
UTF8GenericProperty
Look up property of one UTF-8 character and advance over it Return 0 if input length is zero Return 0 and advance one byte if input is ill-formed
chromium/encodings/compact_lang_det/win/cld_utf8statetable.cc:18
↓ 1 callers
Function
UTF8GenericPropertyBigOneByte
BigOneByte versions are needed for tables > 240 states, but most won't need the TwoByte versions. Internally, to next-to-last offset is multiplied by
chromium/encodings/compact_lang_det/win/cld_utf8statetable.cc:76
↓ 1 callers
Function
UTF8GenericScan
Scan a UTF-8 stringpiece based on a state table. Always scan complete UTF-8 characters Set number of bytes scanned. Return reason for exiting
chromium/encodings/compact_lang_det/win/cld_utf8statetable.cc:130
↓ 1 callers
Function
UnicodeLScriptCode
chromium/encodings/compact_lang_det/letterscript_enum.cc:114
↓ 1 callers
Function
invalid_language_name
chromium/languages/internal/languages.cc:210
↓ 1 callers
Function
runAll
(tests)
test/runner.js:17
↓ 1 callers
Function
runOne
(expectedLangName, text, shouldBeReliable)
test/runner.js:7
↓ 1 callers
Function
strto32
Conversions to a 32-bit integer can pass the call to strto[u]l on 32-bit platforms, but need a little extra work on 64-bit platforms.
chromium/base/strtoint.h:46
next →
1–100 of 252, ranked by callers