ó
<¿CVc @ sþ d d l Z d d l Z d d l m Z d d l m Z m Z d d l Td d l Td d l m Z e j
d ƒ Z e j
d ƒ Z e j
d ƒ Z
e j
d ƒ Z e j
d
ƒ Z e j
d ƒ Z e j
d ƒ Z d
e f d „ ƒ YZ d e e f d „ ƒ YZ d S( iÿÿÿÿN( t compat( t tokenizet tree( t *( t XMLCorpusReaders
]*){0,1}>(.*?)
s ]*){0,1}>(.*?)s# <([wc](?: [^>]*){0,1}>)(.*?)[wc]>s! <[wc](?: [^>]*){0,1}>(.*?)[wc]>s type="(.*?)"s ana="(.*?)"s text id="(.*?)"t
TEICorpusViewc B s2 e Z d d d d „ Z d Z d „ Z d „ Z RS( i c C s> | | _ | | _ | | _ | | _ t j | | d | ƒd S( Nt startpos( t _taggedt _textidst _group_by_sentt _group_by_parat StreamBackedCorpusViewt __init__( t selft corpus_filet taggedt
group_by_sentt
group_by_parat tagsett headLent textids( ( sk /private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/corpus/reader/pl196x.pyR ! s
i c
C sæ | j | j ƒ } t | ƒ } xc | j d ƒ | j d ƒ k sT | j d ƒ d k rƒ | j ƒ } t | ƒ d k rv Pn | | 7} q! W| j d d ƒ } t j | ƒ } | j rxi | D]^ } | | j k rµ | j
| ƒ d } | | j
d ƒ t d ƒ } | | | | | } qµ qµ Wn g } x¿ t j | ƒ D]® } g }
xy t j | ƒ D]h } | j
smt j | ƒ } n! t t | j t j | ƒ ƒ ƒ } | j r§|
j | ƒ qL|
j | ƒ qLW| j rÑ| j |
ƒ q0| j |
ƒ q0W| S( Ns