title: RegexpParser crashes Python 3.8.6 kernel in JupyterLab
body: <p>I am parsing chunks of pos-tagged text in JupyterLabs.</p>
  <p>NLTK can run on Python&lt;3.5 and &gt;3.8 according to its faq.</p>
  <p>I can return pos-tagged text just fine. But when I want to return parsed chunks, it crashes python.</p>
  <p>I am running MacOS 11.1, Python 3.8.6, Jupyterlab 3.0.0, and nltk 3.5</p>
  <pre><code>    from nltk import *
  
  text = &quot;&quot;&quot;The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital
  computer or the gears of a cycle transmission as he does at the top of a mountain
  or in the petals of a flower. To think otherwise is to demean the Buddha...which is
  to demean oneself.&quot;&quot;&quot;
  
  sentence_re = r'''(?x)      
        ([A-Z])(\.[A-Z])+\.?  
      | \w+(-\w+)*            
      | \$?\d+(\.\d+)?%?      
      | \.\.\.                
      | [][.,;&quot;'?():-_`]      
  '''
  
  grammar = r&quot;&quot;&quot;
      NBAR:
          {&lt;NN.*|JJ&gt;*&lt;NN.*&gt;}  # Nouns and Adjectives, terminated with Nouns
          
      NP:
          {&lt;NBAR&gt;}
          {&lt;NBAR&gt;&lt;IN&gt;&lt;NBAR&gt;}  # Above, connected with in/of/etc...
  &quot;&quot;&quot;
  chunker = RegexpParser(grammar)
  toks = word_tokenize(text)
  postoks = pos_tag(toks)
  </code></pre>
  <p>All is fine until I want to parse the chunks with RegexpParser. At which point, it crashes the kernel.</p>
  <pre><code>chunker.parse(postoks)
  </code></pre>
  <p>beginning of the crash report:</p>
  <pre><code>Process:               Python [1549]
  Path:                  /usr/local/Cellar/python@3.8/3.8.6_2/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
  Identifier:            org.python.python
  Version:               3.8.6 (3.8.6)
  Code Type:             X86-64 (Native)
  Parent Process:        Python [1522]
  Responsible:           Terminal [416]
  User ID:               501
  
  Date/Time:             2020-12-29 15:34:13.546 -0500
  OS Version:            macOS 11.1 (20C69)
  Report Version:        12
  Anonymous UUID:        8EEE2257-0986-3569-AA83-52641AF02282
  
  
  Time Awake Since Boot: 1200 seconds
  
  System Integrity Protection: enabled
  
  Crashed Thread:        0  Dispatch queue: com.apple.main-thread
  
  Exception Type:        EXC_CRASH (SIGABRT)
  Exception Codes:       0x0000000000000000, 0x0000000000000000
  Exception Note:        EXC_CORPSE_NOTIFY
  
  Application Specific Information:
  abort() called
  </code></pre>
  <p>end of the crash report:</p>
  <pre><code>External Modification Summary:
    Calls made by other processes targeting this process:
      task_for_pid: 4
      thread_create: 0
      thread_set_state: 0
    Calls made by this process:
      task_for_pid: 0
      thread_create: 0
      thread_set_state: 0
    Calls made by all processes on this machine:
      task_for_pid: 4785
      thread_create: 0
      thread_set_state: 0
  
  VM Region Summary:
  ReadOnly portion of Libraries: Total=835.0M resident=0K(0%) swapped_out_or_unallocated=835.0M(100%)
  Writable regions: Total=1.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.5G(100%)
   
                                  VIRTUAL   REGION 
  REGION TYPE                        SIZE    COUNT (non-coalesced) 
  ===========                     =======  ======= 
  Activity Tracing                   256K        1 
  Dispatch continuations            64.0M        1 
  Kernel Alloc Once                    8K        1 
  MALLOC                           150.1M       37 
  MALLOC guard page                   24K        5 
  MALLOC_MEDIUM (reserved)         960.0M        8         reserved VM address space (unallocated)
  STACK GUARD                         72K       18 
  Stack                             86.6M       18 
  VM_ALLOCATE                      182.5M      359 
  VM_ALLOCATE (reserved)           128.0M        2         reserved VM address space (unallocated)
  __DATA                            16.1M      460 
  __DATA_CONST                      11.8M      200 
  __DATA_DIRTY                       509K       87 
  __FONT_DATA                          4K        1 
  __LINKEDIT                       506.1M      241 
  __OBJC_RO                         60.5M        1 
  __OBJC_RW                         2452K        2 
  __TEXT                           329.5M      432 
  __UNICODE                          588K        1 
  mapped file                       51.5M        9 
  shared memory                       40K        4 
  ===========                     =======  ======= 
  TOTAL                              2.5G     1888 
  TOTAL, minus reserved VM space     1.4G     1888 
  
  Model: iMac18,2, BootROM 429.60.3.0.0, 4 processors, Quad-Core Intel Core i7, 3.6 GHz, 32 GB, SMC 2.40f1
  Graphics: kHW_AMDRadeonPro560Item, Radeon Pro 560, spdisplays_pcie_device, 4 GB
  Memory Module: BANK 0/DIMM0, 16 GB, DDR4 SO-DIMM, 2400 MHz, 0x802C, 0x313641544632473634485A2D3247334232202020
  Memory Module: BANK 1/DIMM0, 16 GB, DDR4 SO-DIMM, 2400 MHz, 0x802C, 0x313641544632473634485A2D3247334232202020
  AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x16E), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1675.1)
  Bluetooth: Version 8.0.2f9, 3 services, 27 devices, 1 incoming serial ports
  Network Service: Wi-Fi, AirPort, en1
  USB Device: USB 3.0 Bus
  USB Device: AS2105
  USB Device: USB 2.0 BILLBOARD
  USB Device: Bluetooth USB Host Controller
  USB Device: FaceTime HD Camera (Built-in)
  USB Device: Scarlett 2i4 USB
  USB Device: My Passport 0827
  Thunderbolt Bus: iMac, Apple Inc., 41.4
  </code></pre>