Auto-generated documentation for fse.inputs module.
class BaseIndexedList(MutableSequence):
def __init__(*args: List[Union[list, set, ndarray]]):
def __delitem__(i: int):
Delete an item.
def __getitem__(i: int) -> tuple:
Getitem method.
tuple ([str], int) Returns the core object, a tuple, for every sentence embedding model.
def __len__():
List length.
int Length of the IndexedList
def __setitem__(i: int, item: str):
Sets an item.
def __str__():
Human readable representation of the object’s state, used for debugging.
str Human readable representation of the object’s state (words and tags).
def append(item: str):
Appends item at last position.
def extend(arg: Union[list, set, ndarray]):
Extens list.
def insert(i: int, item: str):
Inserts an item at a position.
class CIndexedList(BaseIndexedList):
def __init__(
custom_index: Union[list, ndarray],
*args: Union[list, set, ndarray],
):
def __getitem__(i: int) -> tuple:
Getitem method.
tuple Returns the core object, tuple, for every sentence embedding model.
def append(item: str):
def extend(arg: Union[list, set, ndarray]):
def insert(i: int, item: str):
class CSplitCIndexedList(BaseIndexedList):
def __init__(
custom_split: callable,
custom_index: Union[list, ndarray],
*args: Union[list, set, ndarray],
):
def __getitem__(i: int) -> tuple:
Getitem method.
tuple Returns the core object, tuple, for every sentence embedding model.
def append(item: str):
def extend(arg: Union[list, set, ndarray]):
def insert(i: int, item: str):
class CSplitIndexedList(BaseIndexedList):
def __init__(custom_split: callable, *args: Union[list, set, ndarray]):
def __getitem__(i: int) -> tuple:
Getitem method.
tuple Returns the core object, tuple, for every sentence embedding model.
class IndexedLineDocument(object):
def __init__(path, get_able=True):
def __getitem__(i):
Returns the line indexed by i. Primarily used for.
:meth:~fse.models.sentencevectors.SentenceVectors.most_similar
i : int The line index used to index the file
str line at the current index
def __iter__():
Iterate through the lines in the source.
tuple : (list[str], int) Tuple of list of string and index
class IndexedList(BaseIndexedList):
def __init__(*args: Union[list, set, ndarray]):
def __getitem__(i: int) -> tuple:
Getitem method.
tuple Returns the core object, tuple, for every sentence embedding model.
class SplitCIndexedList(BaseIndexedList):
def __init__(
custom_index: Union[list, ndarray],
*args: Union[list, set, ndarray],
):
def __getitem__(i: int) -> tuple:
Getitem method.
tuple Returns the core object, tuple, for every sentence embedding model.
def append(item: str):
def extend(arg: Union[list, set, ndarray]):
def insert(i: int, item: str):
class SplitIndexedList(BaseIndexedList):
def __init__(*args: Union[list, set, ndarray]):
def __getitem__(i: int) -> tuple:
Getitem method.
tuple Returns the core object, tuple, for every sentence embedding model.