B
    .(äbÈ  ã               @   s0   d dl mZ d dlmZ d dlmZ dd„ ZdS )é    )Úunicode_literals)ÚPhraseMatcher)ÚDocc                s˜   t ˆ ƒ}| dtˆ ddgdg¡ | dtˆ ddgdg¡ tˆ dddddgd}||ƒ}t|ƒd	ksjt‚‡ fd
d„|D ƒ}d|ksˆt‚d|ks”t‚dS )zLTest that the PhraseMatcher returns duplicates for duplicate match IDs.
    ÚAZNewZYork)ÚwordsÚBÚIZliveÚiné   c                s   g | ]\}}}ˆ j | ‘qS © )Ústrings)Ú.0Zent_idÚ_)Úen_vocabr   úT/home/dcms/DCMS/lib/python3.7/site-packages/spacy/tests/regression/test_issue3972.pyú
<listcomp>   s    z"test_issue3972.<locals>.<listcomp>N)r   Úaddr   ÚlenÚAssertionError)r   ZmatcherÚdocÚmatchesZ	found_idsr   )r   r   Útest_issue3972   s    r   N)Ú
__future__r   Zspacy.matcherr   Zspacy.tokensr   r   r   r   r   r   Ú<module>   s   