glove/GloveEmbeddings.py
def load(filename: str, keep_in_memory: bool = True, check_embedding_health=False) -> 'Embedding':
        """
        Loads an embedding file and returns a new Embedding instance.

        Parameters:
            filename: The path of the file

            keep_in_memory: Whether all embeddings should be load to the memory. If this flag is set
                to false, the file will be read once to index the embedding and words.
                Further requests to retrieve the embedding will result in a file read.

            check_embedding_health: If set to true, it will be checked that all embeddings have the
                same size. Increases load times.

        Returns:
            An embedding object
        """

        if keep_in_memory:
            return InMemoryEmbedding.load_from_file(filename, check_embedding_health)
        else:
            return FileBasedEmbedding.load_from_file(filename, check_embedding_health)

        Loads an embedding file and returns a new Embedding instance.

        Parameters:
            filename: The path of the file

            keep_in_memory: Whether all embeddings should be load to the memory. If this flag is set
                to false, the file will be read once to index the embedding and words.
                Further requests to retrieve the embedding will result in a file read.

            check_embedding_health: If set to true, it will be checked that all embeddings have the
                same size. Increases load times.

        Returns:
            An embedding object
        
Loads an embedding file and returns a new Embedding instance.
Loads an embedding file and returns a new Embedding instance .
def load(filename: str, keep_in_memory: bool = True, check_embedding_health=False) -> 'Embedding':
        if keep_in_memory:
            return InMemoryEmbedding.load_from_file(filename, check_embedding_health)
        else:
            return FileBasedEmbedding.load_from_file(filename, check_embedding_health)
def load ( filename : str , keep_in_memory : bool = True , check_embedding_health = False ) -> 'Embedding' : if keep_in_memory : return InMemoryEmbedding . load_from_file ( filename , check_embedding_health ) else : return FileBasedEmbedding . load_from_file ( filename , check_embedding_health )
Loads an embedding file and returns a new Embedding instance.
Loads an embedding file and returns a new Embedding instance .
"""
        Loads an embedding file and returns a new Embedding instance.

        Parameters:
            filename: The path of the file

            keep_in_memory: Whether all embeddings should be load to the memory. If this flag is set
                to false, the file will be read once to index the embedding and words.
                Further requests to retrieve the embedding will result in a file read.

            check_embedding_health: If set to true, it will be checked that all embeddings have the
                same size. Increases load times.

        Returns:
            An embedding object
        """
An embedding object
An embedding object
filename
str
The path of the file
The path of the file
keep_in_memory
bool
Whether all embeddings should be load to the memory. If this flag is set
to false, the file will be read once to index the embedding and words.
Further requests to retrieve the embedding will result in a file read.
Whether all embeddings should be load to the memory . If this flag is set to false the file will be read once to index the embedding and words . Further requests to retrieve the embedding will result in a file read .
check_embedding_health
If set to true, it will be checked that all embeddings have the
same size. Increases load times.
If set to true it will be checked that all embeddings have the same size . Increases load times .