class_docstr: Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to
  SQL.
  
  The list of keywords includes ODBC and keywords reserved for future use..
class_docstr_tok: ["Transact-SQL","(","T-SQL",")","is","Microsoft","'s","and","Sybase","'s","proprietary","extension","to","SQL",".","The","list","of","keywords","includes","ODBC","and","keywords","reserved","for","future","use",".."]
code: def analyse_text(text):
      rating = 0
      if tsql_declare_re.search(text):
          # Found T-SQL variable declaration.
          rating = 1.0
      else:
          name_between_backtick_count = len(
              name_between_backtick_re.findall(text)
          )
          name_between_bracket_count = len(
              name_between_bracket_re.findall(text)
          )
          # We need to check if there are any names using
          # backticks or brackets, as otherwise both are 0
          # and 0 >= 2 * 0, so we would always assume it's true
          dialect_name_count = (
              name_between_backtick_count + name_between_bracket_count
          )
          if (
              dialect_name_count >= 1
              and name_between_bracket_count
              >= 2 * name_between_backtick_count
          ):
              # Found at least twice as many [name] as `name`.
              rating += 0.5
          elif name_between_bracket_count > name_between_backtick_count:
              rating += 0.2
          elif name_between_bracket_count > 0:
              rating += 0.1
          if tsql_variable_re.search(text) is not None:
              rating += 0.1
          if tsql_go_re.search(text) is not None:
              rating += 0.1
      return rating
  
imports: import re
  from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, words
  from pygments.token import Punctuation, Whitespace, Text, Comment, Operator, Keyword, Name, String, Number, Generic
  from pygments.lexers import get_lexer_by_name, ClassNotFound
  from pygments.util import iteritems
  from pygments.lexers._postgres_builtins import KEYWORDS, DATATYPES, PSEUDO_TYPES, PLPGSQL_KEYWORDS
  from pygments.lexers import _tsql_builtins
label_desc: Use image node_id 1 for calling the TransactSqlLexer obj's underlying member method code with example usage: obj.analyse_text(text) and returns: rating