Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HendrikStrobelt/detecting-fake-text
/ functions
Functions
91 in github.com/HendrikStrobelt/detecting-fake-text
⨍
Functions
91
◇
Types & classes
26
↳
Endpoints
3
↓ 7 callers
Function
range
(end)
client/src/ts/etc/Util.ts:25
↓ 3 callers
Method
check_probabilities
(self, in_text, topk=40)
backend/api.py:81
↓ 3 callers
Function
re_layout
(w = window.innerWidth, h = window.innerHeight)
client/src/ts/start.ts:275
↓ 2 callers
Method
_render
(rd: BarChartData)
client/src/ts/vis/BarChart.ts:49
↓ 2 callers
Function
currentColorThresholds
()
client/src/ts/start.ts:59
↓ 2 callers
Method
group
(parent, classes, pos = {x: 0, y: 0})
client/src/ts/etc/SVGplus.ts:11
↓ 2 callers
Function
load_demo
client/src/ts/start.ts:96
↓ 2 callers
Method
postprocess
(self, token)
backend/api.py:156
↓ 2 callers
Method
postprocess
(self, token)
backend/api.py:297
↓ 2 callers
Function
startSystem
()
client/src/ts/start.ts:84
↓ 2 callers
Function
token_cleanup
(token)
client/src/ts/etc/Util.ts:68
↓ 2 callers
Method
trigger
(eventName: string, detail: object)
client/src/ts/etc/SimpleEventHandler.ts:26
↓ 2 callers
Function
updateTopKstat
()
client/src/ts/start.ts:138
↓ 2 callers
Method
urlString
* Generates an URL string from a map of url parameters * @param {{}} urlParameters - the map of parameters * @returns {string} - an URI stri
client/src/ts/etc/URLHandler.ts:71
↓ 1 callers
Method
__init__
(self, model_name_or_path="gpt2")
backend/api.py:72
↓ 1 callers
Method
_init
()
client/src/ts/vis/Histogram.ts:32
↓ 1 callers
Method
_init
()
client/src/ts/vis/ToolTip.ts:16
↓ 1 callers
Method
_init
()
client/src/ts/vis/GLTR_Text_Box.ts:45
↓ 1 callers
Method
_init
()
client/src/ts/vis/BarChart.ts:33
↓ 1 callers
Method
_render
(rd: AnalyzedText = this.renderData)
client/src/ts/vis/GLTR_Text_Box.ts:51
↓ 1 callers
Method
_wrangle
(data: BarChartData)
client/src/ts/vis/BarChart.ts:45
↓ 1 callers
Method
all_projects
()
client/src/ts/api/GLTR_API.ts:31
↓ 1 callers
Method
analyze
(project: string, text: string, bitmask: number[] = null)
client/src/ts/api/GLTR_API.ts:36
↓ 1 callers
Method
basicURL
()
client/src/ts/etc/URLHandler.ts:7
↓ 1 callers
Method
bind
(eventNames: string, eventFunction: Function)
client/src/ts/etc/SimpleEventHandler.ts:14
↓ 1 callers
Function
cleanSpecials
client/src/ts/etc/Util.ts:85
↓ 1 callers
Function
currentMode
()
client/src/ts/start.ts:69
↓ 1 callers
Function
flatten
(arr)
client/src/ts/etc/Util.ts:62
↓ 1 callers
Function
main
()
backend/api.py:314
↓ 1 callers
Function
run
(model_name_or_path)
preload_gpt2.py:5
↓ 1 callers
Method
sample_unconditional
Sample `length` words from the model. Code strongly inspired by https://github.com/huggingface/pytorch-pretrained-BERT/blob/m
backend/api.py:126
↓ 1 callers
Function
setup_ui
()
client/src/ts/start.ts:247
↓ 1 callers
Method
simpleUId
({prefix = ''})
client/src/ts/etc/Util.ts:9
↓ 1 callers
Function
top_k_logits
Filters logits to only the top k choices from https://github.com/huggingface/pytorch-pretrained-BERT/blob/master/examples/run_gpt2.py
backend/api.py:56
↓ 1 callers
Method
translate
({x, y})
client/src/ts/etc/SVGplus.ts:7
↓ 1 callers
Function
traverseList
(list, splitter, index)
client/src/ts/etc/Util.ts:53
↓ 1 callers
Method
updateData
(ri: GLTR_RenderItem)
client/src/ts/vis/ToolTip.ts:32
↓ 1 callers
Function
updateEntropyStat
(data: AnalyzeResponse)
client/src/ts/start.ts:144
↓ 1 callers
Function
updateFromRequest
(data: AnalyzeResponse)
client/src/ts/start.ts:165
↓ 1 callers
Method
updateThresholdValues
(ths: number[])
client/src/ts/vis/GLTR_Text_Box.ts:120
↓ 1 callers
Method
updateUrl
(urlParameters: object, addToBrowserHistory = true)
client/src/ts/etc/URLHandler.ts:109
Method
__init__
(self, LM, config)
server.py:22
Method
__init__
In the subclass, you need to load all necessary components for the other functions. Typically, this will comprise a tokenizer
backend/api.py:18
Method
__init__
(self, model_name_or_path="bert-base-cased")
backend/api.py:184
Method
_render
(rD: HistogramData)
client/src/ts/vis/Histogram.ts:53
Method
_wrangle
(data)
client/src/ts/vis/Histogram.ts:125
Method
_wrangle
(data: AnalyzedText)
client/src/ts/vis/GLTR_Text_Box.ts:112
Method
adjustWidth
(bandH: number)
client/src/ts/vis/Histogram.ts:74
Method
adjustWidth
(bandH: number)
client/src/ts/vis/BarChart.ts:59
Function
analyze
(analyze_request)
server.py:34
Function
argsort
(array, sortFct)
client/src/ts/etc/Util.ts:18
Function
arr_to_obj
(arr:any)
client/src/ts/etc/Util.ts:36
Method
check_probabilities
Function that GLTR interacts with to check the probabilities of words Params: - in_text: str -- The text that you want to ch
backend/api.py:27
Method
check_probabilities
Same behavior as GPT-2 Extra param: max_context controls how many words should be fed in left and right Speeds up inf
backend/api.py:200
Method
colorStats
()
client/src/ts/vis/GLTR_Text_Box.ts:126
Method
colorValue
(index: number)
client/src/ts/vis/BarChart.ts:62
Method
coloring
(d: GLTR_RenderItem)
client/src/ts/vis/GLTR_Text_Box.ts:68
Function
constructor
* Simple constructor. Subclasses should call @superInit(options) as well. * see why here: https://stackoverflow.com/questions/43595943/why-are-de
client/src/ts/vis/VisComponent.ts:69
Method
constructor
(baseElement, classes = '')
client/src/ts/etc/SVGplus.ts:24
Method
constructor
(element: Element)
client/src/ts/etc/SimpleEventHandler.ts:9
Method
constructor
(d3Parent: D3Sel, eventHandler?: SimpleEventHandler, options: {} = {})
client/src/ts/vis/Histogram.ts:26
Method
constructor
(private parent: D3Sel, private eh: SimpleEventHandler)
client/src/ts/vis/ToolTip.ts:11
Method
constructor
(parent: D3Sel, eventHandler?: SimpleEventHandler, options = {})
client/src/ts/vis/GLTR_Text_Box.ts:38
Method
constructor
(parent: D3Sel, eventHandler?: SimpleEventHandler, options = {})
client/src/ts/vis/BarChart.ts:27
Method
constructor
(private baseURL: string = null)
client/src/ts/api/GLTR_API.ts:24
Function
decorator
(cls)
backend/class_register.py:5
Function
destroy
()
client/src/ts/vis/VisComponent.ts:225
Method
eventFunctionWrap
client/src/ts/etc/SimpleEventHandler.ts:17
Method
getListeners
()
client/src/ts/etc/SimpleEventHandler.ts:22
Function
get_all_projects
()
server.py:27
Function
hideView
()
client/src/ts/vis/VisComponent.ts:200
Method
isFloat
client/src/ts/etc/URLHandler.ts:26
Method
isInt
client/src/ts/etc/URLHandler.ts:25
Function
obj_to_arr
(obj:object)
client/src/ts/etc/Util.ts:29
Method
parameters
* Read all URL parameters into a map. * @returns {Map} the url parameters as a key-value store (ES6 map)
client/src/ts/etc/URLHandler.ts:17
Method
postprocess
clean up the tokens from any special chars and encode leading space by UTF-8 code '\u0120', linebreak with UTF-8 code 266 '\u010A'
backend/api.py:46
Function
redir
()
server.py:55
Function
register_api
(name)
backend/class_register.py:4
Function
send_data
serves all files from the data dir to ``/data/<path:path>`` :param path: path from api call
server.py:69
Function
send_static
serves all files from ./client/ to ``/client/<path:path>`` :param path: path from api call
server.py:60
Function
setHideElement
(hE: D3Sel)
client/src/ts/vis/VisComponent.ts:196
Function
splitString
(string, splitters)
client/src/ts/etc/Util.ts:45
Function
superInitHTML
(options: {} = {})
client/src/ts/vis/VisComponent.ts:92
Function
superInitSVG
* Has to be called as last call in subclass constructor. * @param {{}} options * @param defaultLayers -- create the default <g> layers: bg -
client/src/ts/vis/VisComponent.ts:105
Method
textLength
(text, style = null)
client/src/ts/etc/SVGplus.ts:30
Method
typeCast
client/src/ts/etc/URLHandler.ts:28
Function
unhideView
()
client/src/ts/vis/VisComponent.ts:211
Function
update
* Every time data has changed, update is called and * triggers wrangling and re-rendering * @param {Object} data data object * @return
client/src/ts/vis/VisComponent.ts:153
Function
updateOptions
* Updates instance options * @param {Object} options only the options that should be updated * @param {Boolean} reRender if option change re
client/src/ts/vis/VisComponent.ts:187
Method
updateURLParam
(key: string, value: string | any[], addToBrowserHistory = true)
client/src/ts/etc/URLHandler.ts:92
Method
visility
(vis: boolean)
client/src/ts/vis/ToolTip.ts:23