Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davidsbatista/Snowball
/ functions
Functions
68 in github.com/davidsbatista/Snowball
⨍
Functions
68
◇
Types & classes
10
↓ 4 callers
Method
construct_words_vectors
Construct TF-IDF representation for each context
snowball/snowball_tuple.py:104
↓ 4 callers
Function
tokenize_entity
Simple poor man's tokenization of an entity string
snowball/sentence.py:17
↓ 3 callers
Function
blocks
Read the file block-wise.
snowball/commons.py:7
↓ 3 callers
Method
calculate_centroid
Calculate the centroid of a pattern
snowball/pattern.py:118
↓ 3 callers
Method
create_vector
Create a TF-IDF vector for the given text, this is only applies when ReVerb is not used to extract patterns.
snowball/snowball_tuple.py:85
↓ 2 callers
Method
get_vector
Return the vector for the given context
snowball/snowball_tuple.py:74
↓ 2 callers
Method
init_bootstrap
Starts a bootstrap iteration
snowball/bootstrapping.py:196
↓ 2 callers
Method
read_seeds
Reads the seeds file and adds the seeds to the holder.
snowball/config.py:96
↓ 2 callers
Method
similarity
Calculate the similarity between a tuple and an extraction pattern
snowball/bootstrapping.py:69
↓ 1 callers
Method
_normalize_confidence
Normalize patterns confidence, find the maximum value of confidence and divide all by the maximum value.
snowball/bootstrapping.py:119
↓ 1 callers
Method
_update_seeds
Update seed set of tuples to use in next iteration: seeds = { T | Conf(T) > min_tuple_confidence }
snowball/bootstrapping.py:184
↓ 1 callers
Method
add_tuple
Add another tuple to be used to generate the pattern
snowball/pattern.py:67
↓ 1 callers
Function
clean_tags
Remove tags from a sentence.
snowball/commons.py:16
↓ 1 callers
Method
cluster_tuples
Cluster the matched instances: generate patterns/update patterns. Applies a single-pass clustering algorithm to cluster the matched i
snowball/bootstrapping.py:86
↓ 1 callers
Method
construct_pattern_vector
Construct TF-IDF representation for each context
snowball/snowball_tuple.py:94
↓ 1 callers
Function
create_args
()
snowball/cli.py:7
↓ 1 callers
Method
debug_patterns
Print patterns to stdout
snowball/bootstrapping.py:53
↓ 1 callers
Method
detect_passive_voice
Detect if the passive voice is present in a pattern
snowball/reverb_breds.py:283
↓ 1 callers
Method
extract_patterns
If a ReVerb pattern is found in the BET context it constructs a TF-IDF vector with the words part of the pattern, otherwise uses all
snowball/snowball_tuple.py:117
↓ 1 callers
Method
extract_reverb_patterns_tagged_ptb
Extract ReVerb relational patterns http://homes.cs.washington.edu/~afader/bib_pdf/emnlp11.pdf The pattern limits the relatio
snowball/reverb_breds.py:108
↓ 1 callers
Function
find_locations
Find the locations of an entity in a text.
snowball/sentence.py:28
↓ 1 callers
Method
generate_tuples
Generate tuples instances from a text file with sentences where named entities are already tagged
snowball/bootstrapping.py:144
↓ 1 callers
Function
main
()
snowball/cli.py:54
↓ 1 callers
Method
match_seeds_tuples
Looks for sentences matching the seed instances, checks if an extracted tuple matches seeds tuples.
snowball/bootstrapping.py:130
↓ 1 callers
Method
merge_tuple_patterns
Merge all tuple patterns into one
snowball/pattern.py:94
↓ 1 callers
Method
read_config
Reads the configuration file and sets the parameters.
snowball/config.py:113
↓ 1 callers
Method
to_json
Return a JSON representation of the tuple.
snowball/snowball_tuple.py:142
↓ 1 callers
Method
update_centroid
Calculate the centroid of a pattern, based on the tuples associated with it. If there is just one tuple associated with this pattern
snowball/pattern.py:102
↓ 1 callers
Method
update_confidence
Update the confidence of the pattern
snowball/pattern.py:60
↓ 1 callers
Method
update_confidence_2003
Update the confidence of the pattern
snowball/pattern.py:49
↓ 1 callers
Method
update_selectivity
Update the selectivity of the pattern
snowball/pattern.py:74
↓ 1 callers
Method
write_relationships_to_disk
Write extracted relationships to disk
snowball/bootstrapping.py:46
Method
__eq__
(self, other: object)
snowball/sentence.py:52
Method
__eq__
(self, other: object)
snowball/sentence.py:81
Method
__eq__
(self, other: Any)
snowball/seed.py:15
Method
__eq__
(self, other: object)
snowball/snowball_tuple.py:60
Method
__eq__
(self, other: Any)
snowball/pattern.py:42
Method
__hash__
(self)
snowball/sentence.py:49
Method
__hash__
(self)
snowball/seed.py:12
Method
__hash__
(self)
snowball/snowball_tuple.py:71
Method
__init__
( # noqa: C901 self, config_file: str, positive_seeds: str, negative_seeds: s
snowball/config.py:22
Method
__init__
( self, surface_string: str, surface_string_parts: List[str], ent_type: str, locations: List[int]
snowball/sentence.py:41
Method
__init__
( self, sentence: str, before: List[Tuple[str, str]], between: List[Tuple[str,
snowball/sentence.py:61
Method
__init__
( self, sentence: str, e1_type: str, e2_type: str, max_tokens: int,
snowball/sentence.py:99
Method
__init__
(self, ent1: str, ent2: str)
snowball/seed.py:8
Method
__init__
( self, ent1: str, ent2: str, sentence: str, before: List[Tuple[str, s
snowball/snowball_tuple.py:24
Method
__init__
(self, tpl: Optional[SnowballTuple])
snowball/pattern.py:19
Method
__init__
(self)
snowball/reverb_breds.py:21
Method
__init__
( self, config_file: str, seeds_file: str, negative_seeds: str, senten
snowball/bootstrapping.py:27
Method
__init__
(self, sentences_file: str, stopwords: set)
snowball/vector_space_model.py:20
Method
__str__
(self)
snowball/snowball_tuple.py:57
Method
__str__
(self)
snowball/pattern.py:36
Method
extract_reverb_patterns
Extract ReVerb relational patterns http://homes.cs.washington.edu/~afader/bib_pdf/emnlp11.pdf VERB - verbs (all tenses and m
snowball/reverb_breds.py:26
Method
extract_reverb_patterns_ptb
Extract ReVerb relational patterns from raw text. Part-of-speech tagging is performed using the default NTLK English tagger.
snowball/reverb_breds.py:192
Function
mock_tokenize
(entity)
tests/test_sentence.py:8
Function
mock_word_tokenize
(monkeypatch)
tests/test_sentence.py:7
Function
test_blocks
Test that the blocks function returns the correct number of lines
tests/test_commons.py:18
Function
test_entity_equality
()
tests/test_sentence.py:38
Function
test_entity_hashing
()
tests/test_sentence.py:32
Function
test_entity_inequality
()
tests/test_sentence.py:44
Function
test_relationship
()
tests/test_sentence.py:50
Function
test_seed_creation
()
tests/test_seed.py:4
Function
test_seed_equality
()
tests/test_seed.py:10
Function
test_seed_hashing
()
tests/test_seed.py:19
Function
test_tokenize_entity
(mock_word_tokenize)
tests/test_sentence.py:14
Function
test_tokenize_entity_with_multiple_spaces
(mock_word_tokenize)
tests/test_sentence.py:26
Function
test_tokenize_entity_with_period
(mock_word_tokenize)
tests/test_sentence.py:20
Function
tmp_file
Create a temporary file with 100 lines, each containing a single byte
tests/test_commons.py:9