Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cslu-nlp/DetectorMorse
/ functions
Functions
18 in github.com/cslu-nlp/DetectorMorse
⨍
Functions
18
◇
Types & classes
1
↓ 6 callers
Method
segments
Given a string of `text`, return a generator yielding each hypothesized sentence string
detectormorse/detector.py:209
↓ 3 callers
Method
candidates
Given a `text` string, get candidates and context for feature extraction and classification
detectormorse/detector.py:114
↓ 3 callers
Function
slurp
Given a `filename` string, slurp the whole file into a string
detectormorse/detector.py:68
↓ 2 callers
Method
extract_one
Given left context `L`, punctuation mark `P`, and right context R`, extract features. Probability distributions for any quant
detectormorse/detector.py:141
↓ 2 callers
Method
predict
Given an left context `L`, punctuation mark `P`, and right context `R`, return True iff this observation is hypothesized to be a
detectormorse/detector.py:200
↓ 2 callers
Function
word_tokenize
Split string `text` into word tokens using the Penn Treebank rules
detectormorse/ptbtokenizer.py:74
↓ 1 callers
Function
default_model
Return a Detector loaded from the default model. Currently, the default model is trained on WSJ.
detectormorse/detector.py:89
↓ 1 callers
Method
evaluate
Given a string of `text`, compute confusion matrix for the classification task.
detectormorse/detector.py:228
↓ 1 callers
Method
fit
Given a string `text`, use it to train the segmentation classifier for `epochs` iterations.
detectormorse/detector.py:186
↓ 1 callers
Function
load_from_resource
Return a Detector loaded from resource with the specified name. The model name must match a filename existing under /models in this pack
detectormorse/detector.py:76
Method
__init__
(self, text=None, nocase=NOCASE, epochs=EPOCHS, classifier=BinaryAveragedPerceptron, **kwargs
detectormorse/detector.py:100
Method
__repr__
(self)
detectormorse/detector.py:107
Function
default_model
()
default_model_test.py:14
Function
test_single_sentence
A single sentence is segmented as a single sentence.
default_model_test.py:18
Function
test_strip
Strip non-initial whitespace by default.
default_model_test.py:39
Function
test_strip_false
Preserve all whitespace when strip=False.
default_model_test.py:47
Function
test_two_sentences_newline
Two sentences joined by newline are segmented as two sentences.
default_model_test.py:32
Function
test_two_sentences_space
Two sentences joined by space are segmented as two sentences.
default_model_test.py:25