Fast_Sentence_Embeddings

Inputs

Auto-generated documentation for fse.inputs module.

BaseIndexedList

[find in source code]

class BaseIndexedList(MutableSequence):
    def __init__(*args: List[Union[list, set, ndarray]]):

BaseIndexedList().__delitem__

[find in source code]

def __delitem__(i: int):

Delete an item.

BaseIndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple ([str], int) Returns the core object, a tuple, for every sentence embedding model.

BaseIndexedList().__len__

[find in source code]

def __len__():

List length.

Returns

int Length of the IndexedList

BaseIndexedList().__setitem__

[find in source code]

def __setitem__(i: int, item: str):

Sets an item.

BaseIndexedList().__str__

[find in source code]

def __str__():

Human readable representation of the object’s state, used for debugging.

Returns

str Human readable representation of the object’s state (words and tags).

BaseIndexedList().append

[find in source code]

def append(item: str):

Appends item at last position.

BaseIndexedList().extend

[find in source code]

def extend(arg: Union[list, set, ndarray]):

Extens list.

BaseIndexedList().insert

[find in source code]

def insert(i: int, item: str):

Inserts an item at a position.

CIndexedList

[find in source code]

class CIndexedList(BaseIndexedList):
    def __init__(
        custom_index: Union[list, ndarray],
        *args: Union[list, set, ndarray],
    ):

See also

CIndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple Returns the core object, tuple, for every sentence embedding model.

CIndexedList().append

[find in source code]

def append(item: str):

CIndexedList().extend

[find in source code]

def extend(arg: Union[list, set, ndarray]):

CIndexedList().insert

[find in source code]

def insert(i: int, item: str):

CSplitCIndexedList

[find in source code]

class CSplitCIndexedList(BaseIndexedList):
    def __init__(
        custom_split: callable,
        custom_index: Union[list, ndarray],
        *args: Union[list, set, ndarray],
    ):

See also

CSplitCIndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple Returns the core object, tuple, for every sentence embedding model.

CSplitCIndexedList().append

[find in source code]

def append(item: str):

CSplitCIndexedList().extend

[find in source code]

def extend(arg: Union[list, set, ndarray]):

CSplitCIndexedList().insert

[find in source code]

def insert(i: int, item: str):

CSplitIndexedList

[find in source code]

class CSplitIndexedList(BaseIndexedList):
    def __init__(custom_split: callable, *args: Union[list, set, ndarray]):

See also

CSplitIndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple Returns the core object, tuple, for every sentence embedding model.

IndexedLineDocument

[find in source code]

class IndexedLineDocument(object):
    def __init__(path, get_able=True):

IndexedLineDocument().__getitem__

[find in source code]

def __getitem__(i):

Returns the line indexed by i. Primarily used for.

:meth:~fse.models.sentencevectors.SentenceVectors.most_similar

Parameters

i : int The line index used to index the file

Returns

str line at the current index

IndexedLineDocument().__iter__

[find in source code]

def __iter__():

Iterate through the lines in the source.

Yields

tuple : (list[str], int) Tuple of list of string and index

IndexedList

[find in source code]

class IndexedList(BaseIndexedList):
    def __init__(*args: Union[list, set, ndarray]):

See also

IndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple Returns the core object, tuple, for every sentence embedding model.

SplitCIndexedList

[find in source code]

class SplitCIndexedList(BaseIndexedList):
    def __init__(
        custom_index: Union[list, ndarray],
        *args: Union[list, set, ndarray],
    ):

See also

SplitCIndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple Returns the core object, tuple, for every sentence embedding model.

SplitCIndexedList().append

[find in source code]

def append(item: str):

SplitCIndexedList().extend

[find in source code]

def extend(arg: Union[list, set, ndarray]):

SplitCIndexedList().insert

[find in source code]

def insert(i: int, item: str):

SplitIndexedList

[find in source code]

class SplitIndexedList(BaseIndexedList):
    def __init__(*args: Union[list, set, ndarray]):

See also

SplitIndexedList().__getitem__

[find in source code]

def __getitem__(i: int) -> tuple:

Getitem method.

Returns

tuple Returns the core object, tuple, for every sentence embedding model.