prosodic.imports

  1import os, sys
  2from logmap import logmap, logger
  3
  4logmap.enable()
  5from base64 import b64decode, b64encode
  6from functools import wraps
  7from pprint import pprint, pformat
  8import orjson
  9import json
 10from multiset import Multiset
 11from tqdm import tqdm
 12import logging
 13from langdetect import detect as detect_lang
 14import pandas as pd
 15import nltk
 16import numpy as np
 17import ftfy
 18import builtins
 19import multiprocessing as mp
 20from collections import deque
 21import requests
 22import textwrap
 23import random
 24import string
 25from functools import cached_property, lru_cache as cache, total_ordering
 26from copy import copy
 27import itertools
 28import zlib
 29import time
 30import warnings
 31from collections import UserList, Counter, defaultdict
 32from typing import *
 33import re
 34import os
 35import sys
 36from contextlib import contextmanager
 37
 38import panphon
 39import panphon.sonority
 40import csv
 41
 42
 43from importlib import resources
 44PATH_HERE = os.path.abspath(os.path.dirname(__file__))
 45PATH_REPO = os.path.dirname(PATH_HERE)
 46PATH_PROSODIC = PATH_HERE
 47PATH_LANGS = os.path.join(PATH_PROSODIC, 'langs')
 48PATH_PHONS = os.path.join(PATH_LANGS,'phonemes.json')
 49PATH_WEB = os.path.join(PATH_PROSODIC, "web")
 50PATH_REPO_DATA = os.path.join(PATH_REPO, "data")
 51PATH_DICTS = os.path.join(PATH_REPO_DATA, "dicts")
 52PATH_HOME = os.path.expanduser("~/prosodic_data")
 53PATH_HOME_DATA = os.path.join(PATH_HOME, "data")
 54PATH_HOME_DATA_CACHE = os.path.join(PATH_HOME_DATA, "cache")
 55os.makedirs(PATH_HOME_DATA, exist_ok=True)
 56
 57USE_CACHE = False
 58USE_REDIS = False
 59HASHSTR_LEN = None
 60DEFAULT_NUM_PROC = None
 61
 62PATH_MTREE = os.path.join(PATH_REPO, "metricaltree")
 63sys.path.append(PATH_MTREE)
 64DASHES = ["--", "–", "—"]
 65REPLACE_DASHES = True
 66PSTRESS_THRESH_DEFAULT = 2
 67TOKENIZER = r"[^\s+]+"
 68SEPS_PHRASE = set(',:;–—()[].!?"“”’‘')
 69SEP_STANZA = "\n\n"
 70SEP_PARA = "\n\n"
 71SEP_LINE = "\n"
 72DEFAULT_PARSE_MAXSEC = 30
 73DEFAULT_LINE_LIM = None
 74DEFAULT_PROCESSORS = {"tokenize": "combined"}
 75MAX_SYLL_IN_PARSE_UNIT = 14
 76MIN_SYLL_IN_PARSE_UNIT = None
 77MIN_WORDS_IN_PHRASE = 2
 78MAX_WORDS_IN_PHRASE = 15
 79DEFAULT_LANG = "en"
 80LOG_FORMAT = "<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <cyan>{function}</cyan> | <level>{message}</level> | <cyan>{file}</cyan>:<cyan>{line}</cyan>"
 81LOG_LEVEL = 5
 82DEFAULT_METER = "default_english"
 83METER_MAX_S = 2
 84METER_MAX_W = 2
 85METER_RESOLVE_OPTIONALITY = True
 86DEFAULT_CATEGORICAL_CONSTRAINTS = []
 87ESPEAK_PATHS = [
 88    "/opt/homebrew/Cellar/espeak/",
 89    "/usr/lib/espeak/",
 90    "/usr/lib/x86_64-linux-gnu/",
 91    "/usr/lib/",
 92    "/usr/local/lib/",
 93]
 94DF_INDEX = [
 95    "stanza_num",
 96    "line_num",
 97    "line_txt",
 98    "parse_rank",
 99    "parse_txt",
100    "bestparse_txt",
101    "parse_meter",
102    "parse_stress",
103    "parse_meter_str",
104    "parse_stress_str",
105    "sent_num",
106    "sentpart_num",
107    "wordtoken_num",
108    "word_lang",
109    "wordtype_lang",
110    "wordtoken_txt",
111    "wordform_num",
112    "meterpos_num",
113    "meterpos_txt",
114    "meterpos_val",
115    "syll_num",
116    "syll_txt",
117    "syll_ipa",
118    "meterslot_num",
119    "meterslot_txt",
120    "phon_txt",
121]
122DF_COLS_RENAME = {
123    "wordtoken_sent_num": "sent_num",
124    "wordtoken_sentpart_num": "sentpart_num",
125    "meterpos_meter_val": "meterpos_val",
126    "meterslot_w_peak": "*w_peak",
127    "meterslot_w_stress": "*w_stress",
128    "meterslot_s_unstress": "*s_unstress",
129    "meterslot_unres_across": "*unres_across",
130    "meterslot_unres_within": "*unres_within",
131    "meterslot_foot_size": "*foot_size",
132    "parse_line_num": "line_num",
133    "parse_stanza_num": "stanza_num",
134    "parse_line_txt": "line_txt",
135    "parselist_num_parses": "line_numparse",
136    "word_lang": "wordtoken_lang",
137}
138DF_BADCOLS = ["word_txt", "word_num", "wordform_txt"]
139LANGS = {}
140HTML_CSS = """
141
142.miniquote { margin-left:0em;margin-top:.5em;font-family:monospace; font-size:.8em;}
143.parse { line-height:2.5em; letter-spacing:.1em;}
144.parselist { list-style-type: none; }
145.parselist li { padding-left:2em;}
146.parselist li:nth-child(5n) { list-style-type: decimal; }
147.parse { text-decoration-offset:5px; }
148
149.viol_y { text-decoration-color:#f43838; color: #f43838; }
150.mtr_s { text-decoration: overline; }
151.str_s { font-weight:600; }
152.parselist > li:first-of-type { list-style-type: decimal; }
153.parselist > li:last-of-type { list-style-type: decimal; }
154"""
155RHYME_MAX_DIST = 1
156
157
158# .str_s { text-decoration: underline dotted; text-underline-offset: 3px; }
159# .str_s.mtr_s { text-decoration: overline; text-underline-offset: 3px; }
160# .viol_y { color:#f43838; }
161# .str_s.mtr_s.viol_y { text-decoration: underline overline; text-decoration-color: #f43838; text-underline-offset: 3px; }
162# .str_s.mtr_s.viol_n { text-decoration: underline overline; text-underline-offset: 3px; }
163# .str_s.mtr_w.viol_y { text-decoration: underline dotted; text-decoration-color: #f43838; text-underline-offset: 3px; }
164# .str_s.mtr_w.viol_n { text-decoration: underline dotted; text-underline-offset: 3px; }
165# .str_w.mtr_w.viol_y { text-decoration: none; color: #f43838; }
166# .str_w.mtr_w.viol_n { text-decoration: none; }
167# .mtr_s.viol_y { text-decoration: overline; text-decoration-color: #f43838; text-underline-offset: .5em; }
168# .mtr_s.viol_n { text-decoration: overline; text-underline-offset: .5em; }
169
170# sys imports
171warnings.filterwarnings("ignore")
172
173# patches
174try:
175    builtins.profile
176except AttributeError:
177    # No line profiler, provide a pass-through version
178    def profile(func):
179        return func
180
181    builtins.profile = profile
182
183# non-sys imports
184pd.options.display.width = 200
185pd.options.display.max_rows = 10
186logging.logger = logging.getLogger()
187while logging.logger.hasHandlers():
188    logging.logger.removeHandler(logging.logger.handlers[0])
189
190# local imports
191
192sonnet = """
193Those hours, that with gentle work did frame
194The lovely gaze where every eye doth dwell,
195Will play the tyrants to the very same
196And that unfair which fairly doth excel;
197For never-resting time leads summer on
198To hideous winter, and confounds him there;
199Sap checked with frost, and lusty leaves quite gone,
200Beauty o’er-snowed and bareness every where:
201Then were not summer’s distillation left,
202A liquid prisoner pent in walls of glass,
203Beauty’s effect with beauty were bereft,
204Nor it, nor no remembrance what it was:
205But flowers distill’d, though they with winter meet,
206Leese but their show; their substance still lives sweet.
207"""
208
209
210GROUPBY_STANZA = ["stanza_num"]
211GROUPBY_LINE = GROUPBY_STANZA + ["line_num", "sent_num", "sentpart_num"]
212GROUPBY_WORD = GROUPBY_LINE + ["wordtoken_num", "wordform_num"]
213GROUPBY_SYLL = GROUPBY_WORD + ["syll_num"]
214
215
216from .utils import *
217from .sents import *
218from .ents import *
219from .texts import *
220from .words import *
221from .langs import *
222from .parsing import *
223
224GLOBALS = globals()
225GLOBALS['list']=list
226
227INITCLASSES = {
228    "Text": Text,
229    "Stanza": Stanza,
230    "Line": Line,
231    "WordToken": WordToken,
232    "WordType": WordType,
233    "WordForm": WordForm,
234    "Syllable": Syllable,
235    "Phoneme": Phoneme,
236    "WordFormList": WordFormList,
237    "Parse": Parse,
238    "ParsePosition": ParsePosition,
239    "ParseSlot": ParseSlot,
240    "ParseList": ParseList,
241}
242
243CHILDCLASSES = {
244    "Text": Stanza,
245    "Stanza": Line,
246    "Line": WordToken,
247    "WordToken": WordType,
248    "WordType": WordForm,
249    "WordForm": Syllable,
250    "Syllable": PhonemeClass,
251    "Phoneme": None,
252    "WordFormList": WordForm,
253    "ParseList": Parse,
254    "Parse": ParsePosition,
255    "ParsePosition": ParseSlot,
256}
257
258CHILDCLASSLISTS = {
259    "Text": StanzaList,
260    "Stanza": LineList,
261    "Line": WordTokenList,
262    "WordToken": WordTypeList,
263    "WordType": WordFormList,
264    "WordForm": SyllableList,
265    "Syllable": PhonemeList,
266    "Phoneme": None,
267}
PATH_HERE = '/Users/ryan/github/prosodic/prosodic'
PATH_REPO = $PWD
PATH_PROSODIC = '/Users/ryan/github/prosodic/prosodic'
PATH_LANGS = '/Users/ryan/github/prosodic/prosodic/langs'
PATH_PHONS = '/Users/ryan/github/prosodic/prosodic/langs/phonemes.json'
PATH_WEB = '/Users/ryan/github/prosodic/prosodic/web'
PATH_REPO_DATA = '/Users/ryan/github/prosodic/data'
PATH_DICTS = '/Users/ryan/github/prosodic/data/dicts'
PATH_HOME = '/Users/ryan/prosodic_data'
PATH_HOME_DATA = '/Users/ryan/prosodic_data/data'
PATH_HOME_DATA_CACHE = '/Users/ryan/prosodic_data/data/cache'
USE_CACHE = False
USE_REDIS = False
HASHSTR_LEN = None
DEFAULT_NUM_PROC = None
PATH_MTREE = '/Users/ryan/github/prosodic/metricaltree'
DASHES = ['--', '–', '—']
REPLACE_DASHES = True
PSTRESS_THRESH_DEFAULT = 2
TOKENIZER = '[^\\s+]+'
SEPS_PHRASE = {',', '—', ';', ')', '!', '“', '”', '"', ':', '–', ']', '’', '‘', '[', '.', '(', '?'}
SEP_STANZA = '\n\n'
SEP_PARA = '\n\n'
SEP_LINE = '\n'
DEFAULT_PARSE_MAXSEC = 30
DEFAULT_LINE_LIM = None
DEFAULT_PROCESSORS = {'tokenize': 'combined'}
MAX_SYLL_IN_PARSE_UNIT = 14
MIN_SYLL_IN_PARSE_UNIT = None
MIN_WORDS_IN_PHRASE = 2
MAX_WORDS_IN_PHRASE = 15
DEFAULT_LANG = 'en'
LOG_FORMAT = '<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <cyan>{function}</cyan> | <level>{message}</level> | <cyan>{file}</cyan>:<cyan>{line}</cyan>'
LOG_LEVEL = 5
DEFAULT_METER = 'default_english'
METER_MAX_S = 2
METER_MAX_W = 2
METER_RESOLVE_OPTIONALITY = True
DEFAULT_CATEGORICAL_CONSTRAINTS = []
ESPEAK_PATHS = ['/opt/homebrew/Cellar/espeak/', '/usr/lib/espeak/', '/usr/lib/x86_64-linux-gnu/', '/usr/lib/', '/usr/local/lib/']
DF_INDEX = ['stanza_num', 'line_num', 'line_txt', 'parse_rank', 'parse_txt', 'bestparse_txt', 'parse_meter', 'parse_stress', 'parse_meter_str', 'parse_stress_str', 'sent_num', 'sentpart_num', 'wordtoken_num', 'word_lang', 'wordtype_lang', 'wordtoken_txt', 'wordform_num', 'meterpos_num', 'meterpos_txt', 'meterpos_val', 'syll_num', 'syll_txt', 'syll_ipa', 'meterslot_num', 'meterslot_txt', 'phon_txt']
DF_COLS_RENAME = {'wordtoken_sent_num': 'sent_num', 'wordtoken_sentpart_num': 'sentpart_num', 'meterpos_meter_val': 'meterpos_val', 'meterslot_w_peak': '*w_peak', 'meterslot_w_stress': '*w_stress', 'meterslot_s_unstress': '*s_unstress', 'meterslot_unres_across': '*unres_across', 'meterslot_unres_within': '*unres_within', 'meterslot_foot_size': '*foot_size', 'parse_line_num': 'line_num', 'parse_stanza_num': 'stanza_num', 'parse_line_txt': 'line_txt', 'parselist_num_parses': 'line_numparse', 'word_lang': 'wordtoken_lang'}
DF_BADCOLS = ['word_txt', 'word_num', 'wordform_txt']
LANGS = {'en': <functools._lru_cache_wrapper object>, 'fi': <functools._lru_cache_wrapper object>}
HTML_CSS = '\n\n.miniquote { margin-left:0em;margin-top:.5em;font-family:monospace; font-size:.8em;}\n.parse { line-height:2.5em; letter-spacing:.1em;}\n.parselist { list-style-type: none; }\n.parselist li { padding-left:2em;}\n.parselist li:nth-child(5n) { list-style-type: decimal; }\n.parse { text-decoration-offset:5px; }\n\n.viol_y { text-decoration-color:#f43838; color: #f43838; }\n.mtr_s { text-decoration: overline; }\n.str_s { font-weight:600; }\n.parselist > li:first-of-type { list-style-type: decimal; }\n.parselist > li:last-of-type { list-style-type: decimal; }\n'
RHYME_MAX_DIST = 1
sonnet = '\nThose hours, that with gentle work did frame\nThe lovely gaze where every eye doth dwell,\nWill play the tyrants to the very same\nAnd that unfair which fairly doth excel;\nFor never-resting time leads summer on\nTo hideous winter, and confounds him there;\nSap checked with frost, and lusty leaves quite gone,\nBeauty o’er-snowed and bareness every where:\nThen were not summer’s distillation left,\nA liquid prisoner pent in walls of glass,\nBeauty’s effect with beauty were bereft,\nNor it, nor no remembrance what it was:\nBut flowers distill’d, though they with winter meet,\nLeese but their show; their substance still lives sweet.\n'
GROUPBY_STANZA = ['stanza_num']
GROUPBY_LINE = ['stanza_num', 'line_num', 'sent_num', 'sentpart_num']
GROUPBY_WORD = ['stanza_num', 'line_num', 'sent_num', 'sentpart_num', 'wordtoken_num', 'wordform_num']
GROUPBY_SYLL = ['stanza_num', 'line_num', 'sent_num', 'sentpart_num', 'wordtoken_num', 'wordform_num', 'syll_num']
GLOBALS = {'__name__': 'prosodic.imports', '__doc__': None, '__package__': 'prosodic', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__spec__': ModuleSpec(name='prosodic.imports', loader=<_frozen_importlib_external.SourceFileLoader object>, origin='/Users/ryan/github/prosodic/prosodic/imports.py'), '__file__': '/Users/ryan/github/prosodic/prosodic/imports.py', '__cached__': '/Users/ryan/github/prosodic/prosodic/__pycache__/imports.cpython-39.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), '__build_class__': <built-in function __build_class__>, '__import__': <built-in function __import__>, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'breakpoint': <built-in function breakpoint>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'compile': <built-in function compile>, 'delattr': <built-in function delattr>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'format': <built-in function format>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'locals': <built-in function locals>, 'max': <built-in function max>, 'min': <built-in function min>, 'next': <built-in function next>, 'oct': <built-in function oct>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'repr': <built-in function repr>, 'round': <built-in function round>, 'setattr': <built-in function setattr>, 'sorted': <built-in function sorted>, 'sum': <built-in function sum>, 'vars': <built-in function vars>, 'None': None, 'Ellipsis': Ellipsis, 'NotImplemented': NotImplemented, 'False': False, 'True': True, 'bool': <class 'bool'>, 'memoryview': <class 'memoryview'>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'classmethod': <class 'classmethod'>, 'complex': <class 'complex'>, 'dict': <class 'dict'>, 'enumerate': <class 'enumerate'>, 'filter': <class 'filter'>, 'float': <class 'float'>, 'frozenset': <class 'frozenset'>, 'property': <class 'property'>, 'int': <class 'int'>, 'list': <class 'list'>, 'map': <class 'map'>, 'object': <class 'object'>, 'range': <class 'range'>, 'reversed': <class 'reversed'>, 'set': <class 'set'>, 'slice': <class 'slice'>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'zip': <class 'zip'>, '__debug__': True, 'BaseException': <class 'BaseException'>, 'Exception': <class 'Exception'>, 'TypeError': <class 'TypeError'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'GeneratorExit': <class 'GeneratorExit'>, 'SystemExit': <class 'SystemExit'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'ImportError': <class 'ImportError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'OSError': <class 'OSError'>, 'EnvironmentError': <class 'OSError'>, 'IOError': <class 'OSError'>, 'EOFError': <class 'EOFError'>, 'RuntimeError': <class 'RuntimeError'>, 'RecursionError': <class 'RecursionError'>, 'NotImplementedError': <class 'NotImplementedError'>, 'NameError': <class 'NameError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'AttributeError': <class 'AttributeError'>, 'SyntaxError': <class 'SyntaxError'>, 'IndentationError': <class 'IndentationError'>, 'TabError': <class 'TabError'>, 'LookupError': <class 'LookupError'>, 'IndexError': <class 'IndexError'>, 'KeyError': <class 'KeyError'>, 'ValueError': <class 'ValueError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'AssertionError': <class 'AssertionError'>, 'ArithmeticError': <class 'ArithmeticError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'OverflowError': <class 'OverflowError'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, 'SystemError': <class 'SystemError'>, 'ReferenceError': <class 'ReferenceError'>, 'MemoryError': <class 'MemoryError'>, 'BufferError': <class 'BufferError'>, 'Warning': <class 'Warning'>, 'UserWarning': <class 'UserWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'FutureWarning': <class 'FutureWarning'>, 'ImportWarning': <class 'ImportWarning'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'BytesWarning': <class 'BytesWarning'>, 'ResourceWarning': <class 'ResourceWarning'>, 'ConnectionError': <class 'ConnectionError'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'NotADirectoryError': <class 'NotADirectoryError'>, 'InterruptedError': <class 'InterruptedError'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'TimeoutError': <class 'TimeoutError'>, 'open': <built-in function open>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'copyright': Copyright (c) 2001-2022 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'license': Type license() to see the full license text, 'help': Type help() for interactive help, or help(object) for help about object., '__pybind11_internals_v4_clang_libcpp_cxxabi1002__': <capsule object NULL>, 'profile': <function profile>}, 'os': <module 'os' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/os.py'>, 'sys': <module 'sys' (built-in)>, 'logmap': <class 'logmap.logmap.logmap'>, 'logger': <loguru.logger handlers=[(id=1, level=10, sink=<_io.StringIO object>)]>, 'b64decode': <function b64decode>, 'b64encode': <function b64encode>, 'wraps': <function wraps>, 'pprint': <function pprint>, 'pformat': <function pformat>, 'orjson': <module 'orjson' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/orjson/__init__.py'>, 'json': <module 'json' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/json/__init__.py'>, 'Multiset': <class 'multiset.Multiset'>, 'tqdm': <class 'tqdm.std.tqdm'>, 'logging': <module 'logging' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/logging/__init__.py'>, 'detect_lang': <function detect>, 'pd': <module 'pandas' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/pandas/__init__.py'>, 'nltk': <module 'nltk' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/nltk/__init__.py'>, 'np': <module 'numpy' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/numpy/__init__.py'>, 'ftfy': <module 'ftfy' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/ftfy/__init__.py'>, 'builtins': <module 'builtins' (built-in)>, 'mp': <module 'multiprocessing' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/multiprocessing/__init__.py'>, 'deque': <class 'collections.deque'>, 'requests': <module 'requests' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/requests/__init__.py'>, 'textwrap': <module 'textwrap' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/textwrap.py'>, 'random': <module 'random' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/random.py'>, 'string': <module 'string' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/string.py'>, 'cached_property': <class 'functools.cached_property'>, 'cache': <function lru_cache>, 'total_ordering': <function total_ordering>, 'copy': <function copy>, 'itertools': <module 'itertools' (built-in)>, 'zlib': <module 'zlib' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/lib-dynload/zlib.cpython-39-darwin.so'>, 'time': <module 'time' (built-in)>, 'warnings': <module 'warnings' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/warnings.py'>, 'UserList': <class 'collections.UserList'>, 'Counter': typing.Counter, 'defaultdict': <class 'collections.defaultdict'>, 'Annotated': <class 'typing.Annotated'>, 'Any': typing.Any, 'Callable': typing.Callable, 'ClassVar': typing.ClassVar, 'Final': typing.Final, 'ForwardRef': <class 'typing.ForwardRef'>, 'Generic': <class 'typing.Generic'>, 'Literal': typing.Literal, 'Optional': typing.Optional, 'Protocol': <class 'typing.Protocol'>, 'Tuple': typing.Tuple, 'Type': typing.Type, 'TypeVar': <class 'typing.TypeVar'>, 'Union': typing.Union, 'AbstractSet': typing.AbstractSet, 'ByteString': typing.ByteString, 'Container': typing.Container, 'ContextManager': typing.ContextManager, 'Hashable': typing.Hashable, 'ItemsView': typing.ItemsView, 'Iterable': typing.Iterable, 'Iterator': typing.Iterator, 'KeysView': typing.KeysView, 'Mapping': typing.Mapping, 'MappingView': typing.MappingView, 'MutableMapping': typing.MutableMapping, 'MutableSequence': typing.MutableSequence, 'MutableSet': typing.MutableSet, 'Sequence': typing.Sequence, 'Sized': typing.Sized, 'ValuesView': typing.ValuesView, 'Awaitable': typing.Awaitable, 'AsyncIterator': typing.AsyncIterator, 'AsyncIterable': typing.AsyncIterable, 'Coroutine': typing.Coroutine, 'Collection': typing.Collection, 'AsyncGenerator': typing.AsyncGenerator, 'AsyncContextManager': typing.AsyncContextManager, 'Reversible': typing.Reversible, 'SupportsAbs': <class 'typing.SupportsAbs'>, 'SupportsBytes': <class 'typing.SupportsBytes'>, 'SupportsComplex': <class 'typing.SupportsComplex'>, 'SupportsFloat': <class 'typing.SupportsFloat'>, 'SupportsIndex': <class 'typing.SupportsIndex'>, 'SupportsInt': <class 'typing.SupportsInt'>, 'SupportsRound': <class 'typing.SupportsRound'>, 'ChainMap': typing.ChainMap, 'Deque': typing.Deque, 'Dict': typing.Dict, 'DefaultDict': typing.DefaultDict, 'List': typing.List, 'OrderedDict': typing.OrderedDict, 'Set': typing.Set, 'FrozenSet': typing.FrozenSet, 'NamedTuple': <function NamedTuple>, 'TypedDict': <function TypedDict>, 'Generator': typing.Generator, 'BinaryIO': <class 'typing.BinaryIO'>, 'IO': <class 'typing.IO'>, 'Match': typing.Match, 'Pattern': typing.Pattern, 'TextIO': <class 'typing.TextIO'>, 'AnyStr': ~AnyStr, 'cast': <function cast>, 'final': <function final>, 'get_args': <function get_args>, 'get_origin': <function get_origin>, 'get_type_hints': <function get_type_hints>, 'NewType': <function NewType>, 'no_type_check': <function no_type_check>, 'no_type_check_decorator': <function no_type_check_decorator>, 'NoReturn': typing.NoReturn, 'overload': <function overload>, 'runtime_checkable': <function runtime_checkable>, 'Text': <class 'prosodic.texts.texts.Text'>, 'TYPE_CHECKING': False, 're': <module 're' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/re.py'>, 'contextmanager': <function contextmanager>, 'panphon': <module 'panphon' from '/Users/ryan/github/prosodic/venv/lib/python3.9/site-packages/panphon/__init__.py'>, 'csv': <module 'csv' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/csv.py'>, 'resources': <module 'importlib.resources' from '/Users/ryan/.pyenv/versions/3.9.13/lib/python3.9/importlib/resources.py'>, 'PATH_HERE': '/Users/ryan/github/prosodic/prosodic', 'PATH_REPO': '/Users/ryan/github/prosodic', 'PATH_PROSODIC': '/Users/ryan/github/prosodic/prosodic', 'PATH_LANGS': '/Users/ryan/github/prosodic/prosodic/langs', 'PATH_PHONS': '/Users/ryan/github/prosodic/prosodic/langs/phonemes.json', 'PATH_WEB': '/Users/ryan/github/prosodic/prosodic/web', 'PATH_REPO_DATA': '/Users/ryan/github/prosodic/data', 'PATH_DICTS': '/Users/ryan/github/prosodic/data/dicts', 'PATH_HOME': '/Users/ryan/prosodic_data', 'PATH_HOME_DATA': '/Users/ryan/prosodic_data/data', 'PATH_HOME_DATA_CACHE': '/Users/ryan/prosodic_data/data/cache', 'USE_CACHE': False, 'USE_REDIS': False, 'HASHSTR_LEN': None, 'DEFAULT_NUM_PROC': None, 'PATH_MTREE': '/Users/ryan/github/prosodic/metricaltree', 'DASHES': ['--', '–', '—'], 'REPLACE_DASHES': True, 'PSTRESS_THRESH_DEFAULT': 2, 'TOKENIZER': '[^\\s+]+', 'SEPS_PHRASE': {',', '—', ';', ')', '!', '“', '”', '"', ':', '–', ']', '’', '‘', '[', '.', '(', '?'}, 'SEP_STANZA': '\n\n', 'SEP_PARA': '\n\n', 'SEP_LINE': '\n', 'DEFAULT_PARSE_MAXSEC': 30, 'DEFAULT_LINE_LIM': None, 'DEFAULT_PROCESSORS': {'tokenize': 'combined'}, 'MAX_SYLL_IN_PARSE_UNIT': 14, 'MIN_SYLL_IN_PARSE_UNIT': None, 'MIN_WORDS_IN_PHRASE': 2, 'MAX_WORDS_IN_PHRASE': 15, 'DEFAULT_LANG': 'en', 'LOG_FORMAT': '<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <cyan>{function}</cyan> | <level>{message}</level> | <cyan>{file}</cyan>:<cyan>{line}</cyan>', 'LOG_LEVEL': 5, 'DEFAULT_METER': 'default_english', 'METER_MAX_S': 2, 'METER_MAX_W': 2, 'METER_RESOLVE_OPTIONALITY': True, 'DEFAULT_CATEGORICAL_CONSTRAINTS': [], 'ESPEAK_PATHS': ['/opt/homebrew/Cellar/espeak/', '/usr/lib/espeak/', '/usr/lib/x86_64-linux-gnu/', '/usr/lib/', '/usr/local/lib/'], 'DF_INDEX': ['stanza_num', 'line_num', 'line_txt', 'parse_rank', 'parse_txt', 'bestparse_txt', 'parse_meter', 'parse_stress', 'parse_meter_str', 'parse_stress_str', 'sent_num', 'sentpart_num', 'wordtoken_num', 'word_lang', 'wordtype_lang', 'wordtoken_txt', 'wordform_num', 'meterpos_num', 'meterpos_txt', 'meterpos_val', 'syll_num', 'syll_txt', 'syll_ipa', 'meterslot_num', 'meterslot_txt', 'phon_txt'], 'DF_COLS_RENAME': {'wordtoken_sent_num': 'sent_num', 'wordtoken_sentpart_num': 'sentpart_num', 'meterpos_meter_val': 'meterpos_val', 'meterslot_w_peak': '*w_peak', 'meterslot_w_stress': '*w_stress', 'meterslot_s_unstress': '*s_unstress', 'meterslot_unres_across': '*unres_across', 'meterslot_unres_within': '*unres_within', 'meterslot_foot_size': '*foot_size', 'parse_line_num': 'line_num', 'parse_stanza_num': 'stanza_num', 'parse_line_txt': 'line_txt', 'parselist_num_parses': 'line_numparse', 'word_lang': 'wordtoken_lang'}, 'DF_BADCOLS': ['word_txt', 'word_num', 'wordform_txt'], 'LANGS': {'en': <functools._lru_cache_wrapper object>, 'fi': <functools._lru_cache_wrapper object>}, 'HTML_CSS': '\n\n.miniquote { margin-left:0em;margin-top:.5em;font-family:monospace; font-size:.8em;}\n.parse { line-height:2.5em; letter-spacing:.1em;}\n.parselist { list-style-type: none; }\n.parselist li { padding-left:2em;}\n.parselist li:nth-child(5n) { list-style-type: decimal; }\n.parse { text-decoration-offset:5px; }\n\n.viol_y { text-decoration-color:#f43838; color: #f43838; }\n.mtr_s { text-decoration: overline; }\n.str_s { font-weight:600; }\n.parselist > li:first-of-type { list-style-type: decimal; }\n.parselist > li:last-of-type { list-style-type: decimal; }\n', 'RHYME_MAX_DIST': 1, 'profile': <function profile>, 'sonnet': '\nThose hours, that with gentle work did frame\nThe lovely gaze where every eye doth dwell,\nWill play the tyrants to the very same\nAnd that unfair which fairly doth excel;\nFor never-resting time leads summer on\nTo hideous winter, and confounds him there;\nSap checked with frost, and lusty leaves quite gone,\nBeauty o’er-snowed and bareness every where:\nThen were not summer’s distillation left,\nA liquid prisoner pent in walls of glass,\nBeauty’s effect with beauty were bereft,\nNor it, nor no remembrance what it was:\nBut flowers distill’d, though they with winter meet,\nLeese but their show; their substance still lives sweet.\n', 'GROUPBY_STANZA': ['stanza_num'], 'GROUPBY_LINE': ['stanza_num', 'line_num', 'sent_num', 'sentpart_num'], 'GROUPBY_WORD': ['stanza_num', 'line_num', 'sent_num', 'sentpart_num', 'wordtoken_num', 'wordform_num'], 'GROUPBY_SYLL': ['stanza_num', 'line_num', 'sent_num', 'sentpart_num', 'wordtoken_num', 'wordform_num', 'syll_num'], 'SimpleCache': <class 'prosodic.utils.SimpleCache'>, 'retry_on_io_error': <function retry_on_io_error>, 'group_ents': <function group_ents>, 'groupby': <function groupby>, 'get_txt': <function get_txt>, 'clean_text': <function clean_text>, 'get_attr_str': <function get_attr_str>, 'safesum': <function safesum>, 'setindex': <function setindex>, 'get_stress': <function get_stress>, 'get_initial_whitespace': <function get_initial_whitespace>, 'unique': <function unique>, 'hashstr': <function hashstr>, 'read_json': <function read_json>, 'from_json': <function from_json>, 'load': <function load>, 'to_json': <function to_json>, 'ensure_dir': <function ensure_dir>, 'encode_cache': <function encode_cache>, 'decode_cache': <function decode_cache>, 'to_html': <function to_html>, 'enable_caching': <function enable_caching>, 'caching_is_enabled': <function caching_is_enabled>, 'disable_caching': <function disable_caching>, 'caching_enabled': <function caching_enabled>, 'caching_disabled': <function caching_disabled>, 'logging_disabled': <function logging_disabled>, 'logging_enabled': <function logging_enabled>, 'force_int': <function force_int>, 'tokenize_agnostic': <function tokenize_agnostic>, 'tokenizers': <module 'prosodic.sents.tokenizers' from '/Users/ryan/github/prosodic/prosodic/sents/tokenizers.py'>, 'get_sent_tokenizer': <functools._lru_cache_wrapper object>, 'tokenize_sents_txt': <function tokenize_sents_txt>, 'tokenize_words_txt': <function tokenize_words_txt>, 'tokenize_sentwords_df': <function tokenize_sentwords_df>, 'tokenize_sentwords_iter': <function tokenize_sentwords_iter>, 'sents': <module 'prosodic.sents.sents' from '/Users/ryan/github/prosodic/prosodic/sents/sents.py'>, 'Entity': <class 'prosodic.ents.Entity'>, 'EntityList': <class 'prosodic.ents.EntityList'>, 'texts': <module 'prosodic.texts.texts' from '/Users/ryan/github/prosodic/prosodic/texts/texts.py'>, 'NUMBUILT': 0, 'lines': <module 'prosodic.texts.lines' from '/Users/ryan/github/prosodic/prosodic/texts/lines.py'>, 'stanzas': <module 'prosodic.texts.stanzas' from '/Users/ryan/github/prosodic/prosodic/texts/stanzas.py'>, 'Line': <class 'prosodic.texts.lines.Line'>, 'Stanza': <class 'prosodic.texts.stanzas.Stanza'>, 'StanzaList': <class 'prosodic.texts.stanzas.StanzaList'>, 'LineList': <class 'prosodic.texts.lines.LineList'>, 'words': <module 'prosodic.words.words' from '/Users/ryan/github/prosodic/prosodic/words/words.py'>, 'SYLL_SEP': '.', 'Word': <function Word>, 'WordToken': <class 'prosodic.words.words.WordToken'>, 'WordType': <class 'prosodic.words.words.WordType'>, 'WordForm': <class 'prosodic.words.words.WordForm'>, 'WordTypeList': <class 'prosodic.words.words.WordTypeList'>, 'WordFormList': <class 'prosodic.words.words.WordFormList'>, 'WordTokenList': <class 'prosodic.words.words.WordTokenList'>, 'phonemes': <module 'prosodic.words.phonemes' from '/Users/ryan/github/prosodic/prosodic/words/phonemes.py'>, 'syllables': <module 'prosodic.words.syllables' from '/Users/ryan/github/prosodic/prosodic/words/syllables.py'>, 'PhonemeList': <class 'prosodic.words.phonemes.PhonemeList'>, 'Syllable': <class 'prosodic.words.syllables.Syllable'>, 'SyllableList': <class 'prosodic.words.syllables.SyllableList'>, 'PhonemeClass': <class 'prosodic.words.phonemes.PhonemeClass'>, 'get_phoneme_featuretable': <functools._lru_cache_wrapper object>, 'Phoneme': <function Phoneme>, 'FEATS_PANPHON': ['num', 'txt', 'syl', 'son', 'cons', 'cont', 'delrel', 'lat', 'nas', 'strid', 'voi', 'sg', 'cg', 'ant', 'cor', 'distr', 'lab', 'hi', 'lo', 'back', 'round', 'velaric', 'tense', 'long', 'hitone', 'hireg'], 'get_ipa_info': <functools._lru_cache_wrapper object>, 'langs': <module 'prosodic.langs.langs' from '/Users/ryan/github/prosodic/prosodic/langs/langs.py'>, 'Language': <class 'prosodic.langs.langs.Language'>, 'fix_recasing': <function fix_recasing>, 'fix_num_sylls': <function fix_num_sylls>, 'unstress': <function unstress>, 'stress': <function stress>, 'ensure_maybe_stressed': <function ensure_maybe_stressed>, 'ensure_unstressed': <function ensure_unstressed>, 'get_espeak_error_msg': <function get_espeak_error_msg>, 'get_espeak_env': <function get_espeak_env>, 'set_espeak_env': <function set_espeak_env>, 'english': <module 'prosodic.langs.english.english' from '/Users/ryan/github/prosodic/prosodic/langs/english/english.py'>, 'EnglishLanguage': <class 'prosodic.langs.english.english.EnglishLanguage'>, 'English': <functools._lru_cache_wrapper object>, 'finnish': <module 'prosodic.langs.finnish.finnish' from '/Users/ryan/github/prosodic/prosodic/langs/finnish/finnish.py'>, 'dirself': '/Users/ryan/github/prosodic/prosodic/langs/finnish', 'make_annotation': <function make_annotation>, 'stress2stroke': {0: '', 1: "'", 2: '`'}, 'orth2phon': {'a': ['ɑ'], 'aa': ['ɑː'], 'e': ['e'], 'ee': ['eː'], 'i': ['i'], 'ii': ['iː'], 'o': ['o'], 'oo': ['oː'], 'u': ['ʊ'], 'uu': ['uː'], 'y': ['y'], 'yy': ['yː'], 'ä': ['æ'], 'ää': ['æː'], 'ö': ['ø'], 'öö': ['øː'], 'å': ['o'], 'ai': ['ɑ', 'i'], 'ei': ['e', 'i'], 'oi': ['o', 'i'], 'äi': ['æ', 'i'], 'öi': ['ø', 'i'], 'au': ['ɑ', 'ʊ'], 'eu': ['e', 'ʊ'], 'ou': ['o', 'ʊ'], 'ey': ['e', 'y'], 'äy': ['æ', 'y'], 'öy': ['ø', 'y'], 'ui': ['ʊ', 'i'], 'yi': ['y', 'i'], 'iu': ['i', 'ʊ'], 'iy': ['i', 'y'], 'ie': ['i', 'e'], 'uo': ['ʊ', 'o'], 'yö': ['y', 'ø'], 'b': ['b'], 'c': ['k'], 'd': ['d'], 'f': ['f'], 'g': ['g'], 'h': ['h'], 'j': ['j'], 'k': ['k'], 'l': ['l'], 'm': ['m'], 'n': ['n'], 'p': ['p'], 'r': ['r'], 's': ['s'], 't': ['t'], 'v': ['v'], 'z': ['z'], 'w': ['v'], 'x': ['z'], 'q': ['k']}, 'ipa2x': {'ɑ': 'a', 'ɑː': 'aa', 'e': 'e', 'eː': 'ee', 'i': 'i', 'iː': 'ii', 'o': 'å', 'oː': 'oo', 'ʊ': 'u', 'uː': 'uu', 'y': 'y', 'yː': 'yy', 'æ': 'ä', 'æː': 'ää', 'ø': 'ö', 'øː': 'öö', 'ɑi': 'ai', 'ei': 'ei', 'oi': 'oi', 'æi': 'äi', 'øi': 'öi', 'ɑʊ': 'au', 'eʊ': 'eu', 'oʊ': 'ou', 'ey': 'ey', 'æy': 'äy', 'øy': 'öy', 'ʊi': 'ui', 'yi': 'yi', 'iʊ': 'iu', 'iy': 'iy', 'ie': 'ie', 'ʊo': 'uo', 'yø': 'yö', 'b': 'b', 'k': 'q', 'd': 'd', 'f': 'f', 'g': 'g', 'h': 'h', 'j': 'j', 'l': 'l', 'm': 'm', 'n': 'n', 'p': 'p', 'r': 'r', 's': 's', 't': 't', 'v': 'w', 'z': 'x'}, 'FinnishLanguage': <class 'prosodic.langs.finnish.finnish.FinnishLanguage'>, 'Finnish': <functools._lru_cache_wrapper object>, 'constraints': <module 'prosodic.parsing.constraints' from '/Users/ryan/github/prosodic/prosodic/parsing/constraints.py'>, 'w_stress': <function w_stress>, 's_unstress': <function s_unstress>, 'unres_within': <function unres_within>, 'foot_size': <function foot_size>, 'unres_across': <function unres_across>, 'w_peak': <function w_peak>, 's_trough': <function s_trough>, 'DEFAULT_CONSTRAINTS_NAMES': ['w_peak', 'w_stress', 's_unstress', 'unres_across', 'unres_within'], 'CONSTRAINTS': {'w_peak': <function w_peak>, 'w_stress': <function w_stress>, 's_unstress': <function s_unstress>, 'unres_across': <function unres_across>, 'unres_within': <function unres_within>, 's_trough': <function s_trough>, 'foot_size': <function foot_size>}, 'DEFAULT_CONSTRAINTS': [<function w_peak>, <function w_stress>, <function s_unstress>, <function unres_across>, <function unres_within>], 'get_constraints': <function get_constraints>, 'CONSTRAINT_DESCS': {'w_peak': 'No polysyllabic stress on weak position', 's_trough': 'No polysyllabic unstress on strong position', 'w_stress': 'No stressed syllables on weak position', 's_unstress': 'No unstressed syllable on strong position', 'unres_across': 'Disyllabic positions crossing words can only contain function words', 'unres_within': 'Disyllabic positions within words must start with a light and stressed syllable', 'foot_size': 'Do not allow positions to exceed two syllables', 'max_s': 'Maximum number of syllables in strong position', 'max_w': 'Maximum number of syllables in weak position', 'resolve_optionality': "Allow parser to choose best words' stress patterns option", 'exhaustive': 'Compute even harmonically bounded parses (those worse in the same ways + another way compared to another parse)'}, 'utils': <module 'prosodic.parsing.utils' from '/Users/ryan/github/prosodic/prosodic/parsing/utils.py'>, 'positions': <module 'prosodic.parsing.positions' from '/Users/ryan/github/prosodic/prosodic/parsing/positions.py'>, 'slots': <module 'prosodic.parsing.slots' from '/Users/ryan/github/prosodic/prosodic/parsing/slots.py'>, 'parses': <module 'prosodic.parsing.parses' from '/Users/ryan/github/prosodic/prosodic/parsing/parses.py'>, 'parselists': <module 'prosodic.parsing.parselists' from '/Users/ryan/github/prosodic/prosodic/parsing/parselists.py'>, 'meter': <module 'prosodic.parsing.meter' from '/Users/ryan/github/prosodic/prosodic/parsing/meter.py'>, 'Parse': <class 'prosodic.parsing.parses.Parse'>, 'ParseList': <class 'prosodic.parsing.parselists.ParseList'>, 'Bounding': <class 'prosodic.parsing.utils.Bounding'>, 'get_iambic_parse': <function get_iambic_parse>, 'split_scansion': <function split_scansion>, 'get_possible_scansions': <functools._lru_cache_wrapper object>, 'getlenparse': <function getlenparse>, 'iter_mpos': <function iter_mpos>, 'NUM_GOING': 0, 'DEFAULT_METER_KWARGS': {'constraints': [<function w_peak>, <function w_stress>, <function s_unstress>, <function unres_across>, <function unres_within>], 'categorical_constraints': [], 'max_s': 2, 'max_w': 2, 'resolve_optionality': True, 'exhaustive': False}, 'MTRDEFAULT': {'constraints': [<function w_peak>, <function w_stress>, <function s_unstress>, <function unres_across>, <function unres_within>], 'categorical_constraints': [], 'max_s': 2, 'max_w': 2, 'resolve_optionality': True, 'exhaustive': False}, 'Meter': <class 'prosodic.parsing.meter.Meter'>, 'ParsePosition': <class 'prosodic.parsing.positions.ParsePosition'>, 'ParseSlot': <class 'prosodic.parsing.slots.ParseSlot'>, 'GLOBALS': {...}, 'list': <class 'list'>, 'INITCLASSES': {'Text': <class 'prosodic.texts.texts.Text'>, 'Stanza': <class 'prosodic.texts.stanzas.Stanza'>, 'Line': <class 'prosodic.texts.lines.Line'>, 'WordToken': <class 'prosodic.words.words.WordToken'>, 'WordType': <class 'prosodic.words.words.WordType'>, 'WordForm': <class 'prosodic.words.words.WordForm'>, 'Syllable': <class 'prosodic.words.syllables.Syllable'>, 'Phoneme': <function Phoneme>, 'WordFormList': <class 'prosodic.words.words.WordFormList'>, 'Parse': <class 'prosodic.parsing.parses.Parse'>, 'ParsePosition': <class 'prosodic.parsing.positions.ParsePosition'>, 'ParseSlot': <class 'prosodic.parsing.slots.ParseSlot'>, 'ParseList': <class 'prosodic.parsing.parselists.ParseList'>}, 'CHILDCLASSES': {'Text': <class 'prosodic.texts.stanzas.Stanza'>, 'Stanza': <class 'prosodic.texts.lines.Line'>, 'Line': <class 'prosodic.words.words.WordToken'>, 'WordToken': <class 'prosodic.words.words.WordType'>, 'WordType': <class 'prosodic.words.words.WordForm'>, 'WordForm': <class 'prosodic.words.syllables.Syllable'>, 'Syllable': <class 'prosodic.words.phonemes.PhonemeClass'>, 'Phoneme': None, 'WordFormList': <class 'prosodic.words.words.WordForm'>, 'ParseList': <class 'prosodic.parsing.parses.Parse'>, 'Parse': <class 'prosodic.parsing.positions.ParsePosition'>, 'ParsePosition': <class 'prosodic.parsing.slots.ParseSlot'>}, 'CHILDCLASSLISTS': {'Text': <class 'prosodic.texts.stanzas.StanzaList'>, 'Stanza': <class 'prosodic.texts.lines.LineList'>, 'Line': <class 'prosodic.words.words.WordTokenList'>, 'WordToken': <class 'prosodic.words.words.WordTypeList'>, 'WordType': <class 'prosodic.words.words.WordFormList'>, 'WordForm': <class 'prosodic.words.syllables.SyllableList'>, 'Syllable': <class 'prosodic.words.phonemes.PhonemeList'>, 'Phoneme': None}}
INITCLASSES = {'Text': <class 'prosodic.texts.texts.Text'>, 'Stanza': <class 'prosodic.texts.stanzas.Stanza'>, 'Line': <class 'prosodic.texts.lines.Line'>, 'WordToken': <class 'prosodic.words.words.WordToken'>, 'WordType': <class 'prosodic.words.words.WordType'>, 'WordForm': <class 'prosodic.words.words.WordForm'>, 'Syllable': <class 'prosodic.words.syllables.Syllable'>, 'Phoneme': <function Phoneme>, 'WordFormList': <class 'prosodic.words.words.WordFormList'>, 'Parse': <class 'prosodic.parsing.parses.Parse'>, 'ParsePosition': <class 'prosodic.parsing.positions.ParsePosition'>, 'ParseSlot': <class 'prosodic.parsing.slots.ParseSlot'>, 'ParseList': <class 'prosodic.parsing.parselists.ParseList'>}
CHILDCLASSES = {'Text': <class 'prosodic.texts.stanzas.Stanza'>, 'Stanza': <class 'prosodic.texts.lines.Line'>, 'Line': <class 'prosodic.words.words.WordToken'>, 'WordToken': <class 'prosodic.words.words.WordType'>, 'WordType': <class 'prosodic.words.words.WordForm'>, 'WordForm': <class 'prosodic.words.syllables.Syllable'>, 'Syllable': <class 'prosodic.words.phonemes.PhonemeClass'>, 'Phoneme': None, 'WordFormList': <class 'prosodic.words.words.WordForm'>, 'ParseList': <class 'prosodic.parsing.parses.Parse'>, 'Parse': <class 'prosodic.parsing.positions.ParsePosition'>, 'ParsePosition': <class 'prosodic.parsing.slots.ParseSlot'>}
CHILDCLASSLISTS = {'Text': <class 'prosodic.texts.stanzas.StanzaList'>, 'Stanza': <class 'prosodic.texts.lines.LineList'>, 'Line': <class 'prosodic.words.words.WordTokenList'>, 'WordToken': <class 'prosodic.words.words.WordTypeList'>, 'WordType': <class 'prosodic.words.words.WordFormList'>, 'WordForm': <class 'prosodic.words.syllables.SyllableList'>, 'Syllable': <class 'prosodic.words.phonemes.PhonemeList'>, 'Phoneme': None}
def profile(func):
179    def profile(func):
180        return func