Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aaasen/kapok
/ functions
Functions
30 in github.com/aaasen/kapok
⨍
Functions
30
◇
Types & classes
4
↓ 11 callers
Function
isTitle
isTitle returns whether or not the given byte array looks like a valid title for a Wikipedia article.s It is based off of http://www.mediawiki.org/wik
parse/page.go:108
↓ 5 callers
Function
SyllableCount
SyllableCount returns the number of syllables in a given string. Dipthongs are not taken into account.
stats/readability.go:33
↓ 3 callers
Method
GetID
(title string, category bool)
generate/gen_csv.go:33
↓ 3 callers
Function
writeNode
(out io.Writer, id int64, title string, label string)
generate/gen_csv.go:80
↓ 2 callers
Method
GeneratePage
(page *parse.Page, nodes io.Writer, rels io.Writer)
generate/gen_csv.go:50
↓ 2 callers
Function
NewCSVGenerator
()
generate/gen_csv.go:15
↓ 2 callers
Function
Sentences
Sentences returns a slice of the sentences in a given string.
stats/readability.go:21
↓ 2 callers
Function
Words
Words returns a slice of the words in a given string.
stats/readability.go:16
↓ 2 callers
Function
writeRel
(out io.Writer, origin int64, dest int64, rel string)
generate/gen_csv.go:86
↓ 1 callers
Function
FleschKincaidEase
FleschKincaidEase computes the ease of reading a given text. The algorithm is explained in detail here: http://en.wikipedia.org/wiki/Flesch%E2%80%93Ki
stats/readability.go:47
↓ 1 callers
Function
NewIDGenerator
()
generate/gen_csv.go:26
↓ 1 callers
Function
NewPageFromXML
NewPageFromXML creates a Page object from XML.
parse/page.go:24
↓ 1 callers
Method
Parse
Parse parses given reader as XML and dumps Page objects into the given channel. Parse will fill the Page's Title, Links, and Categories. When the rea
parse/parse.go:28
↓ 1 callers
Function
generateByPath
(inPath, nodesPath, relsPath string, maxPages int)
main.go:59
↓ 1 callers
Method
getLinks
getLinks populates a Page's Links and Categories fields by parsing the given XML. It will only take into account internal links, piped links, and cate
parse/page.go:41
↓ 1 callers
Method
getPages
GetPages parses a complete XML page into a page object.
parse/parse.go:83
↓ 1 callers
Method
getRawPages
getRawPages creates full pages from a reader that can then be parsed with an XML parser.
parse/parse.go:36
↓ 1 callers
Method
getTitle
getTitle parses the title from an XML representation of a Wikipedia page. In the event of an error or malformed XML, it will return ErrTitleNotFound.
parse/page.go:82
↓ 1 callers
Function
removeAllBytes
(source []byte, targets []byte)
generate/gen_csv.go:90
Function
Generate
(in io.Reader, nodes io.Writer, rels io.Writer, maxPages int)
generate/generate.go:11
Function
NewParser
()
parse/parse.go:16
Method
String
()
parse/page.go:19
Function
TestFleschKincaidEase
(t *testing.T)
stats/readability_test.go:49
Function
TestGeneratePage
(t *testing.T)
generate/gen_csv_test.go:10
Function
TestIsTitle
(t *testing.T)
parse/page_test.go:8
Function
TestSentences
(t *testing.T)
stats/readability_test.go:16
Function
TestSyllables
(t *testing.T)
stats/readability_test.go:34
Function
TestWordCount
(t *testing.T)
stats/readability_test.go:8
Function
main
()
main.go:15
Function
removeEscapedRegions
removeEscapedRegions removes all markup in between the <nowiki> tags. See http://www.mediawiki.org/wiki/Help:Formatting
parse/page.go:116