class_docstr: For Carbon source.
  
  .. versionadded:: 2.15
class_docstr_tok: ["For","Carbon","source",".","..","versionadded",":",":","2.15"]
code: def analyse_text(text):
      result = 0
      if "forall" in text:
          result += 0.1
      if "type" in text:
          result += 0.1
      if "Self" in text:
          result += 0.1
      if "observe" in text:
          result += 0.1
      if "package" in text:
          result += 0.1
      if "library" in text:
          result += 0.1
      if "choice" in text:
          result += 0.1
      if "addr" in text:
          result += 0.1
      if "constraint" in text:
          result += 0.1
      if "impl" in text:
          result += 0.1
      return result
  
imports: import re
  from pygments.lexer import RegexLexer, bygroups, words
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, Whitespace
label_desc: Use image node_id 1 for calling the CarbonLexer obj's underlying member method code with example usage: obj.analyse_text(text) and returns: result