docstr: Reimplementation of the compute_ngrams_bytes method of gensim. This
     overwrite is needed to call our compute_ngrams_bytes method.
  
  Args:
      entity: The entity to hash the ngrams.
      minn: Minimum length of char n-grams to be used for training entity
          representations.
          Defaults to 0.
      maxn: Maximum length of char n-grams to be used for training
          entity representations.
          Defaults to 0.
  
  Returns:
      The ngrams bytes.
docstr_tok: ["Reimplementation","of","the","compute_ngrams_bytes","method","of","gensim",".","This","overwrite","is","needed","to","call","our","compute_ngrams_bytes","method",".","Args",":","entity",":","The","entity","to","hash","the","ngrams",".","minn",":","Minimum","length","of","char","n-grams","to","be","used","for","training","entity","representations",".","Defaults","to","0.","maxn",":","Maximum","length","of","char","n-grams","to","be","used","for","training","entity","representations",".","Defaults","to","0",".","Returns",":","The","ngrams","bytes","."]
code: def compute_ngrams_bytes(
      self, entity: str, minn: int = 0, maxn: int = 0
  ) -> List[bytes]:
      """Reimplementation of the compute_ngrams_bytes method of gensim. This
         overwrite is needed to call our compute_ngrams_bytes method.
  
      Args:
          entity: The entity to hash the ngrams.
          minn: Minimum length of char n-grams to be used for training entity
              representations.
              Defaults to 0.
          maxn: Maximum length of char n-grams to be used for training
              entity representations.
              Defaults to 0.
  
      Returns:
          The ngrams bytes.
  
      """
      if "http" in entity:
          ngrams = " ".join(re.split("[#]", entity)).split()
          return [str.encode(ngram) for ngram in ngrams]
      return [str.encode(entity)]
  
imports: from __future__ import annotations
  import re
  from typing import Any, List
  import attr
  import numpy
  from gensim.models.fasttext import FastText
  from gensim.models.fasttext import FastTextKeyedVectors
  from numpy import float32
  from numpy import ones
  from pyrdf2vec.embedders import Embedder
  from pyrdf2vec.typings import Embeddings, Entities, SWalk
label_desc: Use image node_id 4 for calling the RDFFastTextKeyedVectors obj's underlying member method code with example usage: obj.compute_ngrams_bytes(entity, minn, maxn) and returns: list, unknown