Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Moonshile/ChineseWordSegmentation
/ functions
Functions
34 in github.com/Moonshile/ChineseWordSegmentation
⨍
Functions
34
◇
Types & classes
5
↓ 4 callers
Method
get
(self, theta)
wordseg/hashtree.py:85
↓ 3 callers
Method
count
(self, transactions)
wordseg/hashtree.py:82
↓ 2 callers
Function
entropyOfList
Given a list of some items, compute entropy of the list The entropy is sum of -p[i]*log(p[i]) for every unique element i in the list, and p[i
wordseg/probability.py:10
↓ 2 callers
Method
filterCandidates
Build a HashTree with candidates cand, then count support of these candidates to filter out all those that have support not lower tha
wordseg/freqitem.py:20
↓ 2 callers
Method
getNodes
(self, theta)
wordseg/hashtree.py:89
↓ 1 callers
Method
__init__
(self, text)
wordseg/wordseg.py:34
↓ 1 callers
Method
addBag
Note that bag must be sorted
wordseg/hashtree.py:16
↓ 1 callers
Method
compute
Compute frequency and entropy of this word @param length length of the document for training to get words
wordseg/wordseg.py:52
↓ 1 callers
Method
computeAggregation
Compute aggregation of this word @param words_dict frequency dict of all candidate words
wordseg/wordseg.py:61
↓ 1 callers
Function
find_version
(*file_paths)
setup.py:18
↓ 1 callers
Method
freqOneSet
Generate frequent 1-item sets
wordseg/freqitem.py:29
↓ 1 callers
Method
genFreqItemSets
@return Frequent item sets with their frequency
wordseg/freqitem.py:56
↓ 1 callers
Method
genNextCand
Generate next candidates by dynamic programming Find range [i, j) such that items in this range have same prefix e.g., [1,2,3
wordseg/freqitem.py:39
↓ 1 callers
Function
genSubparts
Partition a string into all possible two parts, e.g. given "abcd", generate [("a", "bcd"), ("ab", "cd"), ("abc", "d")] For string of leng
wordseg/sequence.py:32
↓ 1 callers
Method
genWords
Generate all candidate words with their frequency/entropy/aggregation informations @param doc the document used for words generation
wordseg/wordseg.py:107
↓ 1 callers
Method
getNodes
(self, theta)
wordseg/hashtree.py:52
↓ 1 callers
Function
indexOfSortedSuffix
Treat a suffix as an index where the suffix begins. Then sort these indexes by the suffixes.
wordseg/wordseg.py:17
↓ 1 callers
Function
read
(*parts)
setup.py:13
↓ 1 callers
Function
sameNodes
(nodes1, nodes2)
wordseg/hashtree.py:66
↓ 1 callers
Method
segSentence
Segment a sentence with the words generated from a document @param sentence the sentence to be handled @param method segmenta
wordseg/wordseg.py:133
↓ 1 callers
Method
update
Increase frequency of this word, then append left/right neighbors @param left a single character on the left side of this word
wordseg/wordseg.py:42
Method
__init__
(self, doc, max_word_len=5, min_freq=0.00005, min_entropy=2.0, min_aggregation=50)
wordseg/wordseg.py:87
Method
__init__
(self, transactions, sup_theta=.1)
wordseg/freqitem.py:15
Method
__init__
(self, name='')
wordseg/hashtree.py:10
Method
__init__
(self, bags)
wordseg/hashtree.py:76
Method
__str__
(self)
wordseg/hashtree.py:60
Method
__str__
(self)
wordseg/hashtree.py:93
Method
count
count the child who matches bag, suppose that current node matches
wordseg/hashtree.py:26
Function
dedup
deduplicate the given SORTED list
wordseg/sequence.py:8
Function
genSubstr
Generate all substrings of max length n for string
wordseg/sequence.py:21
Method
get
(self, theta)
wordseg/hashtree.py:41
Function
longestSubsequence
(s1, s2)
wordseg/sequence.py:58
Function
longestSubsequenceLength
(s1, s2)
wordseg/sequence.py:44
Function
sameNode
(node1, node2)
wordseg/hashtree.py:63