File tree Expand file tree Collapse file tree 3 files changed +889709
-3
lines changed
Expand file tree Collapse file tree 3 files changed +889709
-3
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ def _fix_old_short_ids(self):
8383 propv = self .metadata .contains [annotation .at_type ][propk ]
8484 if isinstance (propv , list ):
8585 for i , item in enumerate (propv ):
86- if propv not in mmif_docs and self .id_delimiter not in item :
86+ if item not in mmif_docs and self .id_delimiter not in item :
8787 propv [i ] = f"{ self .id } { self .id_delimiter } { item } "
8888 if propk in annotation .properties :
8989 propv = annotation .properties [propk ]
9090 if isinstance (propv , list ):
9191 for i , item in enumerate (propv ):
92- if propv not in mmif_docs and self .id_delimiter not in item :
92+ if item not in mmif_docs and self .id_delimiter not in item :
9393 propv [i ] = f"{ self .id } { self .id_delimiter } { item } "
9494 self .annotations .append (annotation )
9595
Original file line number Diff line number Diff line change 1515old_mmif_w_short_id = f"https://raw.githubusercontent.com/clamsproject/mmif/1.0.5/specifications/samples/everything/raw.json"
1616EVERYTHING_JSON = request .urlopen (everything_file_url ).read ().decode ('utf-8' )
1717OLD_SHORTID_JSON = request .urlopen (old_mmif_w_short_id ).read ().decode ('utf-8' )
18+ SWT_1_0_JSON = open ('tests/samples/1.0/swt.mmif' ).read ()
1819
1920# for keys and values in chain all typevers in mmif.vocabulary.*_types modules
2021# merge into a single dict
2425
2526MMIF_EXAMPLES = {
2627 'everything' : Template (EVERYTHING_JSON ),
27- 'old_shortid' : Template (OLD_SHORTID_JSON ),
28+ 'mmif_old_shortid' : Template (OLD_SHORTID_JSON ),
29+ 'mmif_swt_1_0' : Template (SWT_1_0_JSON ),
2830}
2931FRACTIONAL_EXAMPLES = {
3032 'doc_only' : Template ("""{
You can’t perform that action at this time.
0 commit comments