class_docstr: Abstract base class for :class:`~gensim.models.phrases.Phrases` and
  :class:`~gensim.models.phrases.FrozenPhrases`.
class_docstr_tok: ["Abstract","base","class","for",":","class",":","`","~gensim.models.phrases.Phrases","`","and",":","class",":","`","~gensim.models.phrases.FrozenPhrases","`","."]
docstr: Convert the input sequence of tokens ``sentence`` into a sequence of tokens where adjacent
          tokens are replaced by a single token if they form a bigram collocation.
  
          If `sentence` is an entire corpus (iterable of sentences rather than a single
          sentence), return an iterable that converts each of the corpus' sentences
          into phrases on the fly, one after another.
  
          Parameters
          ----------
          sentence : {list of str, iterable of list of str}
              Input sentence or a stream of sentences.
  
          Return
          ------
          {list of str, iterable of list of str}
              Sentence with phrase tokens joined by ``self.delimiter``, if input was a single sentence.
              A generator of such sentences if input was a corpus.
  
  s        
docstr_tok: ["Convert","the","input","sequence","of","tokens","``","sentence","``","into","a","sequence","of","tokens","where","adjacent","tokens","are","replaced","by","a","single","token","if","they","form","a","bigram","collocation",".","If","`","sentence","`","is","an","entire","corpus","(","iterable","of","sentences","rather","than","a","single","sentence",")",",","return","an","iterable","that","converts","each","of","the","corpus","'","sentences","into","phrases","on","the","fly",",","one","after","another",".","Parameters","--","--","--","--","--","sentence",":","{","list","of","str",",","iterable","of","list","of","str","}","Input","sentence","or","a","stream","of","sentences",".","Return","--","--","--","{","list","of","str",",","iterable","of","list","of","str","}","Sentence","with","phrase","tokens","joined","by","``","self.delimiter","``",",","if","input","was","a","single","sentence",".","A","generator","of","such","sentences","if","input","was","a","corpus",".","s"]
code: def __getitem__(self, sentence):
      """Convert the input sequence of tokens ``sentence`` into a sequence of tokens where adjacent
              tokens are replaced by a single token if they form a bigram collocation.
  
              If `sentence` is an entire corpus (iterable of sentences rather than a single
              sentence), return an iterable that converts each of the corpus' sentences
              into phrases on the fly, one after another.
  
              Parameters
              ----------
              sentence : {list of str, iterable of list of str}
                  Input sentence or a stream of sentences.
  
              Return
              ------
              {list of str, iterable of list of str}
                  Sentence with phrase tokens joined by ``self.delimiter``, if input was a single sentence.
                  A generator of such sentences if input was a corpus.
  
      s"""
      is_single, sentence = _is_single(sentence)
      if not is_single:
          # If the input is an entire corpus (rather than a single sentence),
          # return an iterable stream.
          return self._apply(sentence)
  
      return [token for token, _ in self.analyze_sentence(sentence)]
  
imports: import logging
  import itertools
  from math import log
  import pickle
  from inspect import getfullargspec
  import time
  from gensim import utils, interfaces
label_desc: Use image node_id 4 for calling the _PhrasesTransformation obj's underlying member method code with example usage: obj.__getitem__(sentence) and returns: unknown, self