Coverage for nltk.yamltags : 58%
![](keybd_closed.png)
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Register YAML tags in the NLTK namespace with the YAML loader, by telling it what module and class to look for.
NLTK uses simple '!' tags to mark the types of objects, but the fully-qualified "tag:nltk.org,2011:" prefix is also accepted in case anyone ends up using it. """
components = name.split('.') module_path = '.'.join(components[:-1]) mod = __import__(module_path) for comp in components[1:]: mod = getattr(mod, comp) return mod
classref = custom_import(classpath) return classref.from_yaml(*args, **kwds)
metaloader(classpath))
|