class_docstr: Class containing unit tests for nltk.tgrep.
class_docstr_tok: ["Class","containing","unit","tests","for","nltk.tgrep","."]
docstr: Test tokenization of node names.
docstr_tok: ["Test","tokenization","of","node","names","."]
code: def test_tokenize_nodenames(self):
      """
      Test tokenization of node names.
      """
      self.assertEqual(tgrep.tgrep_tokenize("Robert"), ["Robert"])
      self.assertEqual(tgrep.tgrep_tokenize("/^[Bb]ob/"), ["/^[Bb]ob/"])
      self.assertEqual(tgrep.tgrep_tokenize("*"), ["*"])
      self.assertEqual(tgrep.tgrep_tokenize("__"), ["__"])
      # test tokenization of NLTK tree position syntax
      self.assertEqual(tgrep.tgrep_tokenize("N()"), ["N(", ")"])
      self.assertEqual(
          tgrep.tgrep_tokenize("N(0,)"), ["N(", "0", ",", ")"]
      )
      self.assertEqual(
          tgrep.tgrep_tokenize("N(0,0)"), ["N(", "0", ",", "0", ")"]
      )
      self.assertEqual(
          tgrep.tgrep_tokenize("N(0,0,)"),
          ["N(", "0", ",", "0", ",", ")"],
      )
  
imports: import unittest
  from nltk import tgrep
  from nltk.tree import ParentedTree
label_desc: Use image node_id 6 for calling the TestSequenceFunctions obj's underlying member method code with example usage: obj.test_tokenize_nodenames() without return types