Stanford Sentiment TreeBank¶
Various functions for accessing the SST dataset.
-
dynn.data.sst.
download_sst
(path='.', force=False)¶ Downloads the SST from “https://nlp.stanford.edu/sentiment/”
Parameters:
-
dynn.data.sst.
load_sst
(path, terminals_only=True, binary=False)¶ Loads the SST dataset
Returns the train, dev and test sets in a dictionary, each as a tuple of containing the trees and the labels.
Parameters: Returns: - Dictionary containing the train, dev and test sets
(tuple of tree/labels tuples)
Return type:
-
dynn.data.sst.
read_sst
(split, path, terminals_only=True, binary=False)¶ Iterates over the SST dataset
Example:
for tree, label in read_sst("train", "/path/to/sst"): train(tree, label)
Parameters: Returns: tree, label
Return type: