
    h}^                        S SK r S SKrS SKrS SKJr  S SKJr  S SKJrJ	r	J
r
JrJrJrJr  S SKrS SKJrJrJrJrJr  S SKJr  SSKJr  SS	KJr  SS
KJrJr  SSKJ r   SSK!J"r"  SSK#J$r$J%r%  SSK&J'r'J(r(J)r)  SSKJ*r*J+r+  SSK,J-r-  SSK.J/r/  SSK0J1r1  SSK2J3r3  Sr4Sr5\" 5       Rm                  \55      S   r7S r8S r9 " S S\35      r:S r;g)    N)islice)Path)AnyCallableDictIterableListOptionalUnion)ConfigCosineDistanceModel	Optimizerset_dropout_rate)Floats2d   )util)Errors)	CandidateKnowledgeBase)Language)Scorer)DocSpan)Examplevalidate_examplesvalidate_get_examples)SimpleFrozenListregistry)Vocab   )EntityLinker_v1)deserialize_config)TrainablePipeTz
[model]
@architectures = "spacy.EntityLinker.v2"

[model.tok2vec]
@architectures = "spacy.HashEmbedCNN.v2"
pretrained_vectors = null
width = 96
depth = 2
embed_size = 2000
window_size = 1
maxout_pieces = 3
subword_features = true
modelc                 R    [         R                  " U 4S[        R                  /0UD6$ )Nnegative_labels)r   score_linksEntityLinkerNIL)exampleskwargss     V/home/james-whalen/.local/lib/python3.13/site-packages/spacy/pipeline/entity_linker.pyentity_linker_scorer.   -   s&    hU9I9I8JUfUU    c                      [         $ N)r.    r/   r-   make_entity_linker_scorerr3   1   s    r/   c            $          \ rS rSrSrSr S9\\SS.S\S\	S\
S	\\
   S
\S\S\S\S\\\/\\   4   S\\\\   /\\\      4   S\\\/\4   S\S\\   S\S\S\\   SS4"S jjjrS\\   S\\   4S jrS\\/\4   4S jrS:S jrSSS.S\/ \\   4   S\\   S\\\/\4      4S  jjrS! rS"SSS#.S\\   S$\S%\\   S&\\\
\4      S\\
\4   4
S' jjrS\\   S(\4S) jr S*\\!   S\"\
   4S+ jr#S*\\!   S,\"\
   SS4S- jr$\%" 5       S..S/ jr&\%" 5       S..S0 jr'\(" 5       S..S1\)\
\*4   S2\\
   SS4S3 jjr+\(" 5       S..S1\)\
\*4   S2\\
   SS 4S4 jjr,SSS5.S6 jr-S7 r.S8r/g);r)   5   zVPipeline component for named entity linking.

DOCS: https://spacy.io/api/entitylinker
r*   N)	overwritescorer	thresholdvocabr%   namelabels_discardn_sents
incl_priorincl_contextentity_vector_lengthget_candidatesget_candidates_batchgenerate_empty_kbr6   r7   use_gold_entscandidates_batch_sizer8   returnc                  ^ ^ Ub7  SUs=::  a  S::  d*  O  [        [        R                  R                  SSUS95      eUT l        UT l        UT l        [        U5      T l        UT l	        UT l
        UT l        U	T l        U
T l        SU0T l        [        SS9T l        U" T R                  U5      T l        UT l        UT l        UT l        US:  a  [        [        R*                  5      eS[,        [.           4UU 4S	 jjnUT l        g)
a  Initialize an entity linker.

vocab (Vocab): The shared vocabulary.
model (thinc.api.Model): The Thinc Model powering the pipeline component.
name (str): The component instance name, used to add entries to the
    losses during training.
labels_discard (Iterable[str]): NER labels that will automatically get a "NIL" prediction.
n_sents (int): The number of neighbouring sentences to take into account.
incl_prior (bool): Whether or not to include prior probabilities from the KB in the model.
incl_context (bool): Whether or not to include the local context in the model.
entity_vector_length (int): Size of encoding vectors in the KB.
get_candidates (Callable[[KnowledgeBase, Span], Iterable[Candidate]]): Function that
    produces a list of candidates, given a certain knowledge base and a textual mention.
get_candidates_batch (
    Callable[[KnowledgeBase, Iterable[Span]], Iterable[Iterable[Candidate]]],
    Iterable[Candidate]]
    ): Function that produces a list of candidates, given a certain knowledge base and several textual mentions.
generate_empty_kb (Callable[[Vocab, int], KnowledgeBase]): Callable returning empty KnowledgeBase.
scorer (Optional[Callable]): The scoring method. Defaults to Scorer.score_links.
use_gold_ents (bool): Whether to copy entities from gold docs or not. If false, another
    component must provide entity annotations.
candidates_batch_size (int): Size of batches for entity candidate generation.
threshold (Optional[float]): Confidence threshold for entity predictions. If confidence is below the
    threshold, prediction is discarded. If None, predictions are not filtered by any threshold.
DOCS: https://spacy.io/api/entitylinker#init
Nr   r!   )range_start	range_endvaluer6   F)	normalizer+   c                    > T(       d  T$ TR                   (       d	  T" U 40 UD6$ TR                  U 5      n TR                  S U  5       5      n[        X5       H  u  p4XCl        M     T" U 40 UD6$ )Nc              3   8   #    U  H  oR                   v   M     g 7fr1   )	predicted).0egs     r-   	<genexpr>FEntityLinker.__init__.<locals>._score_with_ents_set.<locals>.<genexpr>   s     5Hb\\Hs   )rC   _ensure_entspipeziprM   )r+   r,   docsrO   docr7   selfs        r-   _score_with_ents_set3EntityLinker.__init__.<locals>._score_with_ents_set   st     %%h1&11,,X6yy5H5  #82GB#&L  3h1&11r/   )
ValueErrorr   E1043formatr9   r%   r:   listr;   r<   r=   r>   r@   rA   cfgr   distancekbrC   rD   r8   E1044r   r   r7   )rW   r9   r%   r:   r;   r<   r=   r>   r?   r@   rA   rB   r6   r7   rC   rD   r8   rX   s   `            `    r-   __init__EntityLinker.__init__=   s   b  !y*=A*=## !# $   

	">2$(,$8!$/#;&7#DJJ0DE*%:"" 1$V\\**	28G+< 	2 	2  +r/   r+   c                     U R                   (       d  U$ / nU HF  nUR                  5       u  pEUR                  5       nXFR                  l        UR                  U5        MH     U$ )zLIf use_gold_ents is true, set the gold entities to (a copy of) eg.predicted.)rC   get_aligned_ents_and_nercopyrM   entsappend)rW   r+   new_examplesrO   rg   _new_egs          r-   rR   EntityLinker._ensure_ents   s\    !!OB113GDWWYF$(!'	 
 r/   	kb_loaderc                     [        U5      (       d/  [        [        R                  R	                  [        U5      S95      eU" U R                  5      U l        g)zaDefine the KB of this pipe by providing a function that will
create it using this object's vocab.)arg_typeN)callablerZ   r   E885r\   typer9   r`   )rW   rm   s     r-   set_kbEntityLinker.set_kb   s@     	""V[[//i/IJJDJJ'r/   c                 T   U R                   c0  [        [        R                  R	                  U R
                  S95      e[        U R                   S5      (       aP  U R                   R                  5       (       a0  [        [        R                  R	                  U R
                  S95      eg g )Nr:   is_empty)	r`   rZ   r   E1018r\   r:   hasattrrw   E139rW   s    r-   validate_kbEntityLinker.validate_kb   sx    77?V\\00dii0@AA477J''DGG,<,<,>,>V[[//TYY/?@@ -?'r/   )nlprm   get_examplesr~   c                   [        US5        Ub  U R                  U5        U R                  5         U R                  R                  n/ n/ nU R                  [        U" 5       S5      5      nU HT  nUR                  n	UR                  U	5        UR                  U R                  R                  R                  U5      5        MV     [        U5      S:  d,   [        R                  R                  U R                   S95       e[        U5      S:  d,   [        R                  R                  U R                   S95       e[#        U V	s/ s H  oR$                  PM     sn	5      n
U
(       d  US   n	U	SS nSUl        U4U	l        U R                  R)                  XPR                  R                  R+                  USS	9S
9  U
(       d  / W	l        ggs  sn	f )aJ  Initialize the pipe for training, using a representative set
of data examples.

get_examples (Callable[[], Iterable[Example]]): Function that
    returns a representative sample of gold-standard Example objects.
nlp (Language): The current nlp object the component is part of.
kb_loader (Callable[[Vocab], KnowledgeBase]): A function that creates a KnowledgeBase from a Vocab
    instance. Note that providing this argument will overwrite all data accumulated in the current KB.
    Use this only when loading a KB as-such from file.

DOCS: https://spacy.io/api/entitylinker#initialize
zEntityLinker.initializeN
   r   rv   r!   XXXfloat32dtype)XY)r   rs   r|   r`   r?   rR   r   xrh   r%   opsalloc1flenr   E923r\   r:   anyrg   label_
initializeasarray)rW   r   r~   rm   nO
doc_samplevector_sampler+   rO   rV   has_annotationsents               r-   r   EntityLinker.initialize   s   & 	l,EF KK	"WW))
$$VLNB%?@B$$Cc"  !7!7!;<  :"FFKK$6$6DII$6$FF"=!A%Iv{{'9'9tyy'9'II% :>:Cxx:>?Q-Ca(CCJvCH

JJNN22=	2R 	 	
 CH  ?s   Gc                     U HO  nUR                   R                   H2  n[        U R                  U R                  U5      5      nU(       d  M1      g   MQ     g)zpCheck if a batch contains a learnable example.

If one isn't present, then the update step needs to be skipped.
TF)rM   rg   r]   r@   r`   )rW   r+   rO   r   
candidatess        r-   batch_has_learnable_example(EntityLinker.batch_has_learnable_example   sJ     B||((!$"5"5dggs"CD
: )  r/           )dropsgdlossesr   r   r   c                   U R                  5         Uc  0 nUR                  U R                  S5        U(       d  U$ U R                  U5      n[	        US5        U R                  U5      (       d  U$ [        U R                  U5        U Vs/ s H  oUR                  PM     nnU R                  R                  U5      u  pxU R                  XqS9u  pU" U
5        Ub  U R                  U5        X@R                  ==   U	-  ss'   U$ s  snf )a  Learn from a batch of documents and gold-standard information,
updating the pipe's model. Delegates to predict and get_loss.

examples (Iterable[Example]): A batch of Example objects.
drop (float): The dropout rate.
sgd (thinc.api.Optimizer): The optimizer.
losses (Dict[str, float]): Optional record of the loss during training.
    Updated using the component name as the key.
RETURNS (Dict[str, float]): The updated losses dictionary.

DOCS: https://spacy.io/api/entitylinker#update
r   zEntityLinker.update)sentence_encodingsr+   )r|   
setdefaultr:   rR   r   r   r   r%   rM   begin_updateget_lossfinish_update)rW   r+   r   r   r   rO   rU   r   
bp_contextlossd_scoress              r-   updateEntityLinker.update   s    ( 	>F$))S)M$$X.($9: //99MT*'/0xx0)-)@)@)F&1 ' 
 	8?s#yyT! 1s   
Dr   c                 ~   [        US5        / nSn/ nU H  nUR                  SSS9nUR                  5        HZ  nXxR                     n	U	(       a=  U R                  R                  U	5      n
UR                  U
5        UR                  U5        US-  nM\     M     U R                  R                  R                  USS9nX%   nU(       d1  U R                  R                  R                  " UR                  6 nSU4$ UR                  UR                  :w  a)  [        R                  R                  S	S
S9n[        U5      eU R                   R#                  X5      nU R                  R                  R                  " UR                  6 nXU'   U R                   R%                  X5      nU['        U5      -  n[)        U5      U4$ )NzEntityLinker.get_lossr   	ENT_KB_IDT)	as_stringr!   r   r   r   zgold entities do not match upmethodmsg)r   get_alignedget_matching_entsstartr`   
get_vectorrh   r%   r   	asarray2falloc2fshaper   E147r\   RuntimeErrorr_   get_gradr   r   float)rW   r+   r   entity_encodingseidx	keep_entsrO   kb_idsr   kb_identity_encodingselected_encodingsouterr	gradientsr   s                   r-   r   EntityLinker.get_loss,  s   ($;<	B^^K4^@F++-yy)&*gg&8&8&?O$++O<$$T*	 .   ::>>334DI3V/: **..((*<*B*BCCc6M##'7'='==++$$!'F % C s##MM**+=P	jjnn$$&8&>&>?"I}}%%&8Kc*++T{Cr/   rU   c                    U R                  5         Sn/ nU R                  R                  R                  nU(       d  U$ [	        U[
        5      (       a  U/n[        U5       GH  u  pV[        U5      S:X  a  M  UR                   Vs/ s H  owPM     nn[        S[        UR                  5      U R                  5       GH  n	UR                  XU R                  -    n
[        [        U
5      5       Vs/ s H#  nX   R                  U R                  ;  d  M!  UPM%     nn[        U R                  S:  a/  U R                  U R                   U Vs/ s H  oU   PM	     sn5      O.U Vs/ s H!  nU R#                  U R                   X   5      PM#     sn5      n[        U
5       GH  u  p[%        US5      (       d   e[        UR                  5      nUR'                  US   5      UR'                  US   5      4nUS   US   s=:  a  S:  d   e   eU R(                  (       a  [+        SUS   U R,                  -
  5      n[/        [        U5      S-
  US   U R,                  -   5      nUU   R0                  nUU   R2                  nUUU R5                  5       nU R                  R7                  U/5      S   nUR8                  nUR:                  R=                  U5      nUS-  nUR                  U R                  ;   a  UR?                  U R@                  5        GMw  [        X   5      nU(       d  UR?                  U R@                  5        GM  [        U5      S:X  a.  U RB                  c!  UR?                  US   RD                  5        GM  [F        RH                  " U5        URK                  U Vs/ s H  nURL                  PM     sn5      nU RN                  (       d"  URK                  U Vs/ s H  nSPM     sn5      nUnU R(                  (       a  URK                  U Vs/ s H  nURP                  PM     sn5      nUR:                  R=                  USS9n [        U5      [        U5      :w  a'  [S        [T        RV                  RY                  SSS	95      eUR[                  UW5      WU -  -  n!U!R\                  UR\                  :w  a  [_        [T        R`                  5      eUU!-   UU!-  -
  nUR?                  U RB                  b  UR+                  5       U RB                  :  a+  UURc                  5       Re                  5          RD                  O[f        R@                  5        GM     GM     GM
     [        U5      U:X  d)  [T        RV                  RY                  SS
S	9n"[S        U"5      eU$ s  snf s  snf s  snf s  snf s  snf s  snf s  snf )a@  Apply the pipeline's model to a batch of docs, without modifying them.
Returns the KB IDs for each entity in each doc, including NIL if there is
no prediction.

docs (Iterable[Doc]): The documents to predict.
RETURNS (List[str]): The models prediction for each document.

DOCS: https://spacy.io/api/entitylinker#predict
r   r!   sentsr   )axispredictzvectors not of equal lengthr   z$result variables not of equal length)4r|   r%   r   xp
isinstancer   	enumerater   r   rangerg   rD   r   r;   r]   rA   r`   r@   ry   indexr>   maxr<   minr   endas_docr   Tlinalgnormrh   r*   r8   entity_randomshuffler   
prior_probr=   entity_vectorr   r   r   r\   dotr   rZ   E161argmaxitemr)   )#rW   rU   entity_countfinal_kb_idsr   irV   s	sentencesent_idx	ent_batchidxvalid_ent_idxbatch_candidatesjr   r   sent_indicesstart_sentenceend_sentencestart_token	end_tokensent_docsentence_encodingsentence_encoding_tsentence_normr   cprior_probsrj   scoresr   entity_normsimsr   s#                                      r-   r   EntityLinker.predictT  s    	"$ZZ^^dC  6DoFA3x1}$'II.IqII. !CM43M3MNHHW9S9S/ST	
  %S^4!4 ~,,D4G4GG 4  ! $( 11A5 --M!JMSC.M!J $1#0C ++DGGY^D#0	$  (	2FA"30000 OE!a1!b	2$L (?l1oBBBBBB((),QQ$,,0N)O'*	NQ.Q$,,0N( '0&?&E&E$-l$;$?$?	#&{9#=#D#D#F -1JJ,>,>z,J1,M).?.A.A+(*		7J(K A%LzzT%8%88$++DHH5%)*:*=%>
)(//9 _1dnn6L(//
10E0EF"NN:6*,**J5WJqallJ5W*XK#'??.0jjz9Rz!#z9R.S%0F#0035::>H$IjQ__j$I4" 0 /1iinn=MTUn.V#&'7#8C<L#L*6(.(:(:3<0M ); )*+& %& (*vv.>@S'T$1K$?(" $(::1B1B#B*4V[[*A$A)4t);{T?Q)R(//#'>>#9#)::<4>>#A !+6==?+?+?+A B J J &2%5%5	} 3- O &B L!\1++$$ &L % C s##G /! "KZ 6X9R
 %Js0   V'2 V,V,V1&(V6+V;(W Wr   c                    [        U VVs/ s H  o3R                    H  oDPM     M     snn5      nU[        U5      :w  a0  [        [        R                  R                  U[        U5      S95      eSnU R                  S   nU HG  nUR                   H4  nX&   nUS-  nU H"  n	U	R                  S:X  d	  U(       d  M  Xl        M$     M6     MI     gs  snnf )zModify a batch of documents, using pre-computed scores.

docs (Iterable[Doc]): The documents to modify.
kb_ids (List[str]): The IDs to set, produced by EntityLinker.predict.

DOCS: https://spacy.io/api/entitylinker#set_annotations
)rg   idsr   r6   r!   N)	r   rg   rZ   r   E148r\   r^   	ent_kb_id
ent_kb_id_)
rW   rU   r   rV   r   
count_entsr   r6   r   tokens
             r-   set_annotationsEntityLinker.set_annotations  s     B####BC
V$V[[//ZS[/QRRHH[)	Cxx	Q E!+yy+0( !    Cs   C
excludec                  ^ ^ T R                  5         0 n[        T S5      (       a  T R                  b	  U 4S jUS'   UU 4S jUS'   T R                  R                  US'   T R
                  R                  US'   [        R                  " UT5      $ )zSerialize the pipe to a bytestring.

exclude (Iterable[str]): String names of serialization fields to exclude.
RETURNS (bytes): The serialized object.

DOCS: https://spacy.io/api/entitylinker#to_bytes
r^   c                  D   > [         R                  " T R                  5      $ r1   )srsly
json_dumpsr^   r{   s   r-   <lambda>'EntityLinker.to_bytes.<locals>.<lambda>  s    u'7'7'Ar/   c                  6   > TR                   R                  T S9$ Nr  )r9   to_bytes)r  rW   s   r-   r	  r
    s    TZZ%8%8%8%Ir/   r9   r`   r%   )_validate_serialization_attrsry   r^   r`   r  r%   r   )rW   r  	serializes   `` r-   r  EntityLinker.to_bytes  sx     	**,	4DHH$8AIeI	'''**	$!ZZ00	'}}Y00r/   c                   ^ ^ T R                  5         U 4S jn0 n[        T S5      (       a  T R                  b	  U 4S jUS'   UU 4S jUS'   U 4S jUS'   X4S'   [        R                  " XT5        T $ )	zLoad the pipe from a bytestring.

exclude (Iterable[str]): String names of serialization fields to exclude.
RETURNS (TrainablePipe): The loaded object.

DOCS: https://spacy.io/api/entitylinker#from_bytes
c                    >  TR                   R                  U 5        g ! [         a    [        [        R
                  5      S ef = fr1   )r%   
from_bytesAttributeErrorrZ   r   E149brW   s    r-   
load_model+EntityLinker.from_bytes.<locals>.load_model  s:    8

%%a(! 8 -478s	    %Ar^   c                 b   > TR                   R                  [        R                  " U 5      5      $ r1   )r^   r   r  
json_loadsr  s    r-   r	  )EntityLinker.from_bytes.<locals>.<lambda>  s    488??5;K;KA;N+Or/   c                 8   > TR                   R                  U TS9$ r  )r9   r  )r  r  rW   s    r-   r	  r    s    )>)>q')>)Rr/   r9   c                 :   > TR                   R                  U 5      $ r1   )r`   r  r  s    r-   r	  r    s    dgg&8&8&;r/   r`   r%   )r  ry   r^   r   r  )rW   
bytes_datar  r  deserializes   ` `  r-   r  EntityLinker.from_bytes  sl     	**,	8 4DHH$8!OKRG;D)G
9r/   pathr  c                   ^ ^ 0 nUU 4S jUS'   U 4S jUS'   U 4S jUS'   U 4S jUS'   [         R                  " XT5        g	)
zSerialize the pipe to disk.

path (str / Path): Path to a directory.
exclude (Iterable[str]): String names of serialization fields to exclude.

DOCS: https://spacy.io/api/entitylinker#to_disk
c                 8   > TR                   R                  U TS9$ r  )r9   to_diskpr  rW   s    r-   r	  &EntityLinker.to_disk.<locals>.<lambda>  s    tzz'9'9!W'9'Mr/   r9   c                 F   > [         R                  " U TR                  5      $ r1   )r  
write_jsonr^   r'  rW   s    r-   r	  r(    s    U%5%5a%Br/   r^   c                 :   > TR                   R                  U 5      $ r1   )r`   r%  r+  s    r-   r	  r(    s    DGGOOA$6r/   r`   c                 :   > TR                   R                  U 5      $ r1   )r%   r%  r+  s    r-   r	  r(    s    tzz'9'9!'<r/   r%   N)r   r%  )rW   r"  r  r  s   ` ` r-   r%  EntityLinker.to_disk  s?     	M	'B	%6	$<	'Tg.r/   c                   ^ ^ U 4S jn0 nU 4S jUS'   UU 4S jUS'   U 4S jUS'   X4S'   [         R                  " XT5        T $ )	a&  Load the pipe from disk. Modifies the object in place and returns it.

path (str / Path): Path to a directory.
exclude (Iterable[str]): String names of serialization fields to exclude.
RETURNS (EntityLinker): The modified EntityLinker object.

DOCS: https://spacy.io/api/entitylinker#from_disk
c                    >  U R                  S5       nTR                  R                  UR                  5       5        S S S 5        g ! , (       d  f       g = f! [         a    [        [        R                  5      S ef = f)Nrb)openr%   r  readr  rZ   r   r  )r'  infilerW   s     r-   r  *EntityLinker.from_disk.<locals>.load_model*  sV    8VVD\VJJ))&++-8 "\\! 8 -478s'   A *AA 
AA A %A=c                 L   > TR                   R                  [        U 5      5      $ r1   )r^   r   r#   r+  s    r-   r	  (EntityLinker.from_disk.<locals>.<lambda>2  s    txx7I!7L'Mr/   r^   c                 8   > TR                   R                  U TS9$ r  )r9   	from_diskr&  s    r-   r	  r7  3  s    )=)=a)=)Qr/   r9   c                 :   > TR                   R                  U 5      $ r1   )r`   r9  r+  s    r-   r	  r7  4  s    dgg&7&7&:r/   r`   r%   )r   r9  )rW   r"  r  r  r   s   ` `  r-   r9  EntityLinker.from_disk  sH    	8 8:MEQG:D)Gt'2r/   )r   r   c                    [         er1   NotImplementedError)rW   r+   r   r   configs        r-   rehearseEntityLinker.rehearse9      !!r/   c                     [         er1   r=  )rW   labels     r-   	add_labelEntityLinker.add_label<  rB  r/   )rD   r^   r_   r@   rA   r>   r=   r`   r;   r%   r<   r:   r7   r8   rC   r9   )entity_linker)rE   N)0__name__
__module____qualname____firstlineno____doc__r*   BACKWARD_OVERWRITEr.   r    r   strr   intboolr   r   r   r   r
   r   rb   r   rR   rs   r|   r   r   r   r   r   r   r   r   r   r	   r   r  tupler  r  r   r   r   r%  r9  r@  rE  __static_attributes__r2   r/   r-   r)   r)   5   s   
 C $	^+  -%8 &*)^+^+ ^+ 	^+ !^+ ^+ ^+ ^+ "^+ !-!68K!KL^+ 'HTN+Xhy6I-JJ
^+ $UCL-$?@^+  !^+" "#^+$ %^+&  #'^+( E?)^+* 
+^+@Xg%6 8G;L (%-)? @ (A #'@D4r8G#4454 h	4
 HeWm%;<=4l$ #'-1-7#- 	-
 i - c5j)*- 
c5j	-^& '!2 &  & PxHSM xd3i xt1HSM 149 1 1* #(' 1" 16 4 CSBT/#t)$/2:3-/	/$ CSBT#t)$2:3-	6 )-T ""r/   r)   c                 |    U S:X  a"  [         R                  " S5      nUR                  $ [        S[         SU  35      e)Nmake_entity_linkerzspacy.pipeline.factorieszmodule z has no attribute )	importlibimport_modulerT  r  rH  )r:   modules     r-   __getattr__rX  A  sA    ##(()CD(((
78*,>tfE
FFr/   )<rU  r   sys	itertoolsr   pathlibr   typingr   r   r   r   r	   r
   r   r  	thinc.apir   r   r   r   r   thinc.typesr    r   errorsr   r`   r   r   languager   r7   r   tokensr   r   trainingr   r   r   r   r   r9   r    legacy.entity_linkerr"   rS   r#   trainable_piper$   rM  default_model_configfrom_strDEFAULT_NEL_MODELr.   r3   r)   rX  r2   r/   r-   <module>ri     s      
   G G G  P P     )    H H -  1 $ )    H%%&:;GD VH"= H"XGr/   