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: Analyze a sentence, concatenating any detected phrases into a single token.
  
  Parameters
  ----------
  sentence : iterable of str
      Token sequence representing the sentence to be analyzed.
  
  Yields
  ------
  (str, {float, None})
      Iterate through the input sentence tokens and yield 2-tuples of:
      - ``(concatenated_phrase_tokens, score)`` for token sequences that form a phrase.
      - ``(word, None)`` if the token is not a part of a phrase.
docstr_tok: ["Analyze","a","sentence",",","concatenating","any","detected","phrases","into","a","single","token",".","Parameters","--","--","--","--","--","sentence",":","iterable","of","str","Token","sequence","representing","the","sentence","to","be","analyzed",".","Yields","--","--","--","(","str",",","{","float",",","None","}",")","Iterate","through","the","input","sentence","tokens","and","yield","2-tuples","of",":","-","``","(","concatenated_phrase_tokens",",","score",")","``","for","token","sequences","that","form","a","phrase",".","-","``","(","word",",","None",")","``","if","the","token","is","not","a","part","of","a","phrase","."]
code: def analyze_sentence(self, sentence):
      """Analyze a sentence, concatenating any detected phrases into a single token.
  
      Parameters
      ----------
      sentence : iterable of str
          Token sequence representing the sentence to be analyzed.
  
      Yields
      ------
      (str, {float, None})
          Iterate through the input sentence tokens and yield 2-tuples of:
          - ``(concatenated_phrase_tokens, score)`` for token sequences that form a phrase.
          - ``(word, None)`` if the token is not a part of a phrase.
  
      """
      start_token, in_between = None, []
      for word in sentence:
          if word not in self.connector_words:
              # The current word is a normal token, not a connector word, which means it's a potential
              # beginning (or end) of a phrase.
              if start_token:
                  # We're inside a potential phrase, of which this word is the end.
                  phrase, score = self.score_candidate(
                      start_token, word, in_between
                  )
                  if score is not None:
                      # Phrase detected!
                      yield phrase, score
                      start_token, in_between = None, []
                  else:
                      # Not a phrase after all. Dissolve the candidate's constituent tokens as individual words.
                      yield start_token, None
                      for w in in_between:
                          yield w, None
                      start_token, in_between = (
                          word,
                          [],
                      )  # new potential phrase starts here
              else:
                  # Not inside a phrase yet; start a new phrase candidate here.
                  start_token, in_between = word, []
          else:  # We're a connector word.
              if start_token:
                  # We're inside a potential phrase: add the connector word and keep growing the phrase.
                  in_between.append(word)
              else:
                  # Not inside a phrase: emit the connector word and move on.
                  yield word, None
      # Emit any non-phrase tokens at the end.
      if start_token:
          yield start_token, None
          for w in in_between:
              yield w, None
  
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 3 for calling the _PhrasesTransformation obj's underlying member method code with example usage: obj.analyze_sentence(sentence) without return types