Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aboSamoor/pycld2
/ functions
Functions
421 in github.com/aboSamoor/pycld2
⨍
Functions
421
◇
Types & classes
16
↓ 1 callers
Function
GetStatedLangScript
Return language and script from parsed line
cld2/internal/scoreutf8text.cc:104
↓ 1 callers
Function
GetTextBeginPos
Return position of start of text
cld2/internal/cld2_do_score.cc:146
↓ 1 callers
Function
GetTextBeginPos
Return position of start of text
cld2/internal/scoreutf8text.cc:138
↓ 1 callers
Function
GetUniAt
Debug output string of one unigram
cld2/internal/debug.cc:32
↓ 1 callers
Function
GetUniHits
Score up to 64KB of a single script span in one pass Make a dummy entry off the end to calc length of last span Return offset of first unused input by
cld2/internal/cldutil.cc:201
↓ 1 callers
Function
InitCLDLangPriors
cld2/internal/compact_lang_det_hint_code.h:52
↓ 1 callers
Function
InitHtmlOut
cld2/internal/cld2_unittest_full.cc:351
↓ 1 callers
Function
InitHtmlOut
cld2/internal/cld2_unittest.cc:265
↓ 1 callers
Function
InitResult
cld2/internal/scoreutf8text.cc:236
↓ 1 callers
Function
IsComment
cld2/internal/cld2_do_score.cc:85
↓ 1 callers
Function
IsComment
cld2/internal/scoreutf8text.cc:80
↓ 1 callers
Function
IsComment
cld2/internal/compact_lang_det_test.cc:87
↓ 1 callers
Function
JustOneItemToVector
Add just one element to resultchunk vector: For RTypeNone or RTypeOne
cld2/internal/scoreonescriptspan.cc:513
↓ 1 callers
Function
LangDetLinesOfFile
cld2/internal/scoreutf8text.cc:393
↓ 1 callers
Function
LanguageDeclaredName
cld2/internal/lang_script.cc:219
↓ 1 callers
Function
LinearizeAll
Effectively, do a merge-sort based on text offsets Look up each indirect value in appropriate scoring table and keep just the resulting langprobs
cld2/internal/scoreonescriptspan.cc:856
↓ 1 callers
Function
LinearizeHitBuffer
Merge-sort the individual hit arrays, go indirect on the scoring subscripts, break linear array into chunks. Input: hitbuffer base, delta, distinct a
cld2/internal/scoreonescriptspan.cc:1043
↓ 1 callers
Function
LookupEntity
Useful for converting an entity to an ascii value. RETURNS unicode value, or -1 if entity isn't valid. Don't include & or ;
cld2/internal/getonescriptspan.cc:292
↓ 1 callers
Function
MaxInt
cld2/internal/compact_lang_det_hint_code.cc:936
↓ 1 callers
Function
MoveLang1ToLang2
Move all the text bytes from lower byte-count to higher one
cld2/internal/compact_lang_det_impl.cc:1105
↓ 1 callers
Function
NextChunkLang
cld2/internal/scoreonescriptspan.cc:367
↓ 1 callers
Function
OctaFPJustHash
From 40-bit gram FP, return hash table subscript and remaining key
cld2/internal/cldutil_shared.h:389
↓ 1 callers
Function
OctaHash40
OCTAGRAM wrapper with surrounding spaces Pick up 1..24 bytes plus pre/post space and hash them via mask/shift/add UNDERSHOOTS 1 byte, OVERSHOOTS up to
cld2/internal/cldutil_shared.cc:348
↓ 1 callers
Function
OneTest
cld2/internal/cld2_unittest_full.cc:287
↓ 1 callers
Function
PairHash
Hash a consecutive pair of tokens/words A B Old: hash is B - A, which gives too many false hits on one-char diffs Now: rotate(A,13) + B
cld2/internal/cldutil_shared.cc:384
↓ 1 callers
Function
PrintLangs
cld2/internal/compact_lang_det_impl.cc:1247
↓ 1 callers
Function
PriorVecLang
cld2/internal/scoreonescriptspan.cc:362
↓ 1 callers
Function
QuadFPJustHash
From 32-bit gram FP, return hash table subscript and remaining key
cld2/internal/cldutil_shared.h:380
↓ 1 callers
Function
QuadLen
src points to a letter. Find the byte length of a quadgram starting there.
cld2/internal/cldutil_shared.cc:411
↓ 1 callers
Function
ReadEntity
Unescape the current character pointed to by src. SETS the number of chars read for the conversion (in UTF8). If src isn't a valid entity, just cons
cld2/internal/getonescriptspan.cc:393
↓ 1 callers
Function
ReadLine
cld2/internal/cld2_do_score.cc:72
↓ 1 callers
Function
ReadLine
cld2/internal/scoreutf8text.cc:67
↓ 1 callers
Function
Readline
cld2/internal/compact_lang_det_test.cc:74
↓ 1 callers
Function
RecordCLDResult
cld2/internal/scoreutf8text.cc:250
↓ 1 callers
Function
RefineScoredClosePairs
Move less likely byte count to more likely for close pairs of languages If given, also update resultchunkvector
cld2/internal/compact_lang_det_impl.cc:1154
↓ 1 callers
Method
Reinit
cld2/internal/tote.cc:40
↓ 1 callers
Function
ReliabilityDelta
Return reliablity of result 0..100 for top two scores delta==0 is 0% reliable, delta==fully_reliable_thresh is 100% reliable (on a scale where +1 is a
cld2/internal/cldutil.cc:553
↓ 1 callers
Function
ReliabilityExpected
cld2/internal/cldutil.cc:587
↓ 1 callers
Function
RemoveExtendedLanguages
Delete any extended languages from doc_tote
cld2/internal/compact_lang_det_impl.cc:977
↓ 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,
cld2/internal/compact_lang_det_impl.cc:997
↓ 1 callers
Function
RunTests
cld2/internal/cld2_unittest_full.cc:373
↓ 1 callers
Function
ScoreAllHits
Score chunks of text described by hitbuffer, allowing each to be in a different language, and optionally adjusting the boundaries inbetween. Set last_
cld2/internal/scoreonescriptspan.cc:265
↓ 1 callers
Function
ScoreBoosts
For each chunk, add extra weight for language priors (from content-lang and meta lang=xx) and distinctive tokens
cld2/internal/scoreonescriptspan.cc:125
↓ 1 callers
Function
ScoreCJKScriptSpan
Score RTypeCJK scriptspan into doc_tote and vec, updating scoringcontext
cld2/internal/scoreonescriptspan.cc:1163
↓ 1 callers
Function
ScoreEntireScriptSpan
Score RTypeNone or RTypeOne scriptspan into doc_tote and vec, updating scoringcontext
cld2/internal/scoreonescriptspan.cc:1132
↓ 1 callers
Function
ScoreOneChunk
Score all the bases, deltas, distincts, boosts for one chunk into chunk_tote After last chunk there is always a hitbuffer entry with an offset just of
cld2/internal/scoreonescriptspan.cc:208
↓ 1 callers
Function
ScoreOneLine
Return score per 1024 bytes for top language
cld2/internal/cld2_do_score.cc:34
↓ 1 callers
Function
ScoreOneScriptSpan
Score one scriptspan into doc_tote and vec, updating scoringcontext Inputs: One scriptspan of perhaps 40-60KB, all same script lower-case letters and
cld2/internal/scoreonescriptspan.cc:1302
↓ 1 callers
Function
ScoreQuadScriptSpan
Score RTypeMany scriptspan into doc_tote and vec, updating scoringcontext We have a scriptspan with all lowercase text in one script. Look up quadgram
cld2/internal/scoreonescriptspan.cc:1231
↓ 1 callers
Function
SetCLDContentLangHint
Add hints to vector of langpriors Input is string after HTTP header Content-Language:
cld2/internal/compact_lang_det_hint_code.cc:1439
↓ 1 callers
Function
SetCLDEncodingHint
Add hints to vector of langpriors Input is from DetectEncoding()
cld2/internal/compact_lang_det_hint_code.cc:1466
↓ 1 callers
Function
SetCLDLanguageHint
Add hints to vector of langpriors Input is from random source
cld2/internal/compact_lang_det_hint_code.cc:1503
↓ 1 callers
Function
SetCLDTLDHint
Add hints to vector of langpriors Input is last element of hostname (no dot), e.g. from GetTLD()
cld2/internal/compact_lang_det_hint_code.cc:1446
↓ 1 callers
Function
SetChunkSummary
Needs expected score per 1KB in scoring context
cld2/internal/scoreonescriptspan.cc:60
↓ 1 callers
Method
SetValue
cld2/internal/tote.h:88
↓ 1 callers
Function
SharpenBoundaries
For all but the first summary, if its top language differs from the previous chunk, refine the boundary Linearized version
cld2/internal/scoreonescriptspan.cc:780
↓ 1 callers
Function
SkipMe
cld2/internal/scoreutf8text.cc:379
↓ 1 callers
Function
SummaryBufferToDocTote
cld2/internal/scoreonescriptspan.cc:305
↓ 1 callers
Function
SummaryBufferToVector
Add n elements of summarybuffer to resultchunk vector: Each element is letters-only text [offset..offset+bytes) This maps back to original[Back(offset
cld2/internal/scoreonescriptspan.cc:389
↓ 1 callers
Function
Trim
Remove any trailing digits/spaces (possible mapreduce counts) Return length
cld2/internal/scoreutf8text.cc:386
↓ 1 callers
Function
TrimCLDLangPriors
Trim language priors to no more than max_entries, keeping largest abs weights
cld2/internal/compact_lang_det_hint_code.cc:975
↓ 1 callers
Function
UNALIGNED_STORE32
cld2/internal/port.h:126
↓ 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
cld2/internal/utf8statetable.cc:299
↓ 1 callers
Function
UTF8GenericPropertyTwoByte
TwoByte versions are needed for tables > 240 states Look up property of one UTF-8 character and advance over it Return 0 if input length is zero Retur
cld2/internal/utf8statetable.cc:390
↓ 1 callers
Function
UTF8GenericReplace
Scan a UTF-8 stringpiece based on state table, copying to output stringpiece and doing text replacements. Also writes an optional OffsetMap. Pass NULL
cld2/internal/utf8statetable.cc:1166
↓ 1 callers
Function
UTF8GenericReplaceInternal
Scan a UTF-8 stringpiece based on state table, copying to output stringpiece and doing text replacements. DO NOT CALL DIRECTLY. Use UTF8GenericReplace
cld2/internal/utf8statetable.cc:636
↓ 1 callers
Function
UTF8GenericReplaceInternalTwoByte
Scan a UTF-8 stringpiece based on state table with two-byte entries, copying to output stringpiece and doing text replacements. DO NOT CALL DIRECTLY.
cld2/internal/utf8statetable.cc:905
↓ 1 callers
Function
UniLen
src points to a letter. Find the byte length of a unigram starting there.
cld2/internal/cldutil_shared.cc:396
↓ 1 callers
Function
ZeroPSLang
cld2/internal/scoreonescriptspan.cc:39
↓ 1 callers
Method
_test_detect_one
(self, expected_lang_name, s)
test_pycld2.py:20
↓ 1 callers
Function
advance
cld2/internal/cld2_dynamic_data_extractor.cc:29
↓ 1 callers
Function
alignAll
Assuming that all fields have been set in the specified header, re-align the starting positions of all data chunks to be aligned along 64-bit boundari
cld2/internal/cld2_dynamic_data_extractor.cc:199
↓ 1 callers
Function
ascii_isalnum
cld2/internal/getonescriptspan.cc:312
↓ 1 callers
Function
coreAssumptionsOk
cld2/internal/cld2_dynamic_data.cc:206
↓ 1 callers
Function
dumpHeader
cld2/internal/cld2_dynamic_data.cc:51
↓ 1 callers
Function
hex_digit_to_int
cld2/internal/getonescriptspan.cc:318
↓ 1 callers
Function
initDeltaHeaders
cld2/internal/cld2_dynamic_data_extractor.cc:333
↓ 1 callers
Function
initTableHeaders
cld2/internal/cld2_dynamic_data_extractor.cc:162
↓ 1 callers
Function
initUtf8Headers
cld2/internal/cld2_dynamic_data_extractor.cc:338
↓ 1 callers
Function
isLittleEndian
As noted on http://stackoverflow.com/questions/1001307, gcc is highly likely to convert this function's return into a constant - meaning that any if-b
cld2/internal/cld2_dynamic_data.cc:198
↓ 1 callers
Function
loadDataRaw
cld2/internal/cld2_dynamic_data_loader.cc:190
↓ 1 callers
Function
loadHeaderFromRaw
cld2/internal/cld2_dynamic_data_loader.cc:41
↓ 1 callers
Function
mem_compare
cld2/internal/cld2_dynamic_data.cc:26
↓ 1 callers
Function
readlines
(f)
bindings/test_shuffle.py:15
↓ 1 callers
Method
remove_suffix
cld2/internal/stringpiece.h:62
↓ 1 callers
Function
runetochar
runetochar copies (encodes) one rune, pointed to by r, to at most UTFmax bytes starting at s and returns the number of bytes generated.
cld2/internal/getonescriptspan.cc:249
↓ 1 callers
Function
strcasecmp
Re-written (simplified) from BSD strings.h
bindings/encodings.cc:106
↓ 1 callers
Function
strto32_base10
cld2/internal/getonescriptspan.cc:325
↓ 1 callers
Function
strto32_base16
cld2/internal/getonescriptspan.cc:357
↓ 1 callers
Function
verify
cld2/internal/cld2_dynamic_data.cc:113
↓ 1 callers
Function
writeDataFile
cld2/internal/cld2_dynamic_data_extractor.cc:46
Method
AddBytes
cld2/internal/tote.h:43
Method
AddClosePair
cld2/internal/tote.h:74
Function
AddDistinctBoost1
Update scoring context distinct_boost for single language quad
cld2/internal/scoreonescriptspan.cc:105
Function
ApplyAllLanguageHints
cld2/internal/compact_lang_det_impl.cc:1206
Function
ApproxProb3
Converts a unigram prob/lang byte into an approximate prob/lang triple Just keeps the largest value. Now unused.
cld2/internal/cldutil_offline.cc:177
Method
Backup
Back up over previous range, 1..5 bytes Return subscript at the beginning of that. Pins at 0
cld2/internal/offsetmap.cc:304
Function
CLD2_Debug
For showing one chunk Print debug output for one scored chunk Optionally print out per-chunk scoring information In degenerate cases, hitbuffer and cs
cld2/internal/debug_empty.cc:44
Function
CLD2_Debug2
For showing all chunks
cld2/internal/debug_empty.cc:54
Function
CLD2_Debug2
For showing all chunks
cld2/internal/debug.cc:411
← previous
next →
201–300 of 421, ranked by callers