tethne package¶
Subpackages¶
- tethne.analyze package
- tethne.bin package
- tethne.classes package
- tethne.dao package
- tethne.model package
- tethne.networks package
- tethne.plot package
- tethne.readers package
- tethne.serialize package
- tethne.tests package
- Submodules
- tethne.tests.test_analyze_corpus module
- tethne.tests.test_analyze_features module
- tethne.tests.test_analyze_graph module
- tethne.tests.test_classes_corpus module
- tethne.tests.test_classes_feature module
- tethne.tests.test_classes_graphcollection module
- tethne.tests.test_classes_streamingcorpus module
- tethne.tests.test_classes_structuredfeature module
- tethne.tests.test_model_social_tapmodel module
- tethne.tests.test_models_lda module
- tethne.tests.test_networks_authors module
- tethne.tests.test_networks_base module
- tethne.tests.test_networks_features module
- tethne.tests.test_networks_helpers module
- tethne.tests.test_networks_papers module
- tethne.tests.test_readers_base module
- tethne.tests.test_readers_dfr module
- tethne.tests.test_readers_merge module
- tethne.tests.test_readers_scopus module
- tethne.tests.test_readers_wos module
- tethne.tests.test_readers_zotero module
- tethne.tests.test_utilities module
- tethne.tests.test_writers_collection module
- tethne.tests.test_writers_corpus module
- tethne.tests.test_writers_graph module
- Module contents
- tethne.writers package
Submodules¶
tethne.utilities module¶
Helper functions.
-
class
tethne.utilities.
MLStripper
[source]¶ Bases:
HTMLParser.HTMLParser
-
tethne.utilities.
attribs_to_string
(attrib_dict, keys)[source]¶ A more specific version of the subdict utility aimed at handling node and edge attribute dictionaries for NetworkX file formats such as gexf (which does not allow attributes to have a list type) by making them writable in those formats
-
tethne.utilities.
concat_list
(listA, listB, delim=' ')[source]¶ Concatenate list elements pair-wise with the delim character Returns the concatenated list Raises index error if lists are not parallel
-
tethne.utilities.
contains
(l, f)[source]¶ Searches list l for a pattern specified in a lambda function f.
-
tethne.utilities.
dict_from_node
(node, recursive=False)[source]¶ Converts ElementTree node to a dictionary.
Parameters: node : ElementTree node
recursive : boolean
If recursive=False, the value of any field with children will be the number of children.
Returns: dict : nested dictionary.
Tags as keys and values as values. Sub-elements that occur multiple times in an element are contained in a list.
-
tethne.utilities.
normalize
(s)[source]¶ Normalize a token.
- Convert to lower-case,
- Remove all punctuation,
- Remove all numbers.
-
tethne.utilities.
strip_non_ascii
(s)[source]¶ Returns the string without non-ASCII characters.
Parameters: string : string
A string that may contain non-ASCII characters.
Returns: clean_string : string
A string that does not contain non-ASCII characters.
Module contents¶
Tethne is a Python package that draws together tools and techniques from bibliometrics, computational linguistics, and social influence modeling into a single easy-to-use corpus analysis framework. Scholars can use Tethne to parse and organize data from the ISI Web of Science and JSTOR Data-for-Research databases, and generate time-variant citation-based network models, topic models, and social influence models.
analyze |
Methods for analyzing Corpus , GraphCollection , and networkx.Graph objects. |
classes |
The classes package provides the fundamental classes for working with bibliographic data in Tethne. |
model |
|
networks |
Methods for building networks from bibliographic data. |
readers |
Methods for parsing bibliographic datasets. |
writers |
Export networks to structured and unstructured formats, for visualization. |