Skip to content

Commit

Permalink
1603:1:51 (#9): updated, refs #12
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Jan 28, 2022
1 parent b21789e commit 32858ae
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 81 deletions.
16 changes: 9 additions & 7 deletions officinam/1603/1/51/1603_1_51.no1.tm.hxl.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#item+conceptum+numerordinatio,#item+conceptum+codicem,#status+conceptum,#status+conceptum+codicem,#item+rem+i_qcc+is_zxxx+ix_uid,#item+rem+i_qcc+is_zxxx+ix_csvsffxm,#item+rem+i_qcc+is_zxxx+ix_hxla,#item+rem+i_latn+is_latn,#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_linguam,#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_scriptum,#item+rem+i_qcc+is_zxxx+ix_wikilngm,#item+rem+i_qcc+is_zxxx+ix_glottocode,#item+rem+i_qcc+is_zxxx+ix_iso639p3a3
1603:1:51:1,1,90,19,ara-Arab,__i_ara__is_arab,+i_ara+is_arab,Macrolingua Arabica (Abecedarium Arabicum),Q13955,Q8196,ar,arab1395,ara
1603:1:51:2,2,90,19,ben-Beng,__i_ben__is_beng,+i_ben+is_beng,Lingua Bengali (?),Q9610,Q756802,bn,beng1280,ben
1603:1:51:3,3,90,19,grc-Grek,__i_grc__is_grek,+i_grc+is_grek,Lingua Graeca antiqua (Alphabetum Graecum),Q35497,Q8216,grc,anci1242,grc
1603:1:51:4,4,90,19,lat-Latn,__i_lat__is_latn,+i_lat+is_latn,Lingua Latina (Abecedarium Latinum),Q397,Q8229,la,lati1261,lat
1603:1:51:5,5,90,19,rus-Cyrl,__i_rus__is_cyrl,+i_rus+is_cyrl,Lingua Russica (Abecedarium Cyrillicum),Q7737,Q8209,ru,russ1263,rus
1603:1:51:6,6,60,19,san-Zzzz,__i_san__is_zzzz,+i_san+is_zzzz,Lingua Sanscrita,Q11059,,sa,sans1269,san
#item+conceptum+numerordinatio,#item+conceptum+codicem,#status+conceptum,#status+conceptum+codicem,#item+rem+i_qcc+is_zxxx+ix_uid,#item+rem+i_qcc+is_zxxx+ix_csvsffxm,#item+rem+i_qcc+is_zxxx+ix_hxla,#item+rem+i_lat+is_latn,#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_linguam,#item+rem+i_qcc+is_zxxx+ix_wikiq+ix_scriptum,#item+rem+i_qcc+is_zxxx+ix_wikilngm,#item+rem+i_qcc+is_zxxx+ix_glottocode,#item+rem+i_qcc+is_zxxx+ix_iso639p3a3
1603:1:51:1,1,60,25,qcc-Zxxx,__i_qcc__is_zxxx,+i_qcc+is_zxxx,Conceptus cōdicī (Non scrīptum linguae),,,,,
1603:1:51:10,10,60,25,mul-Zyyy,__i_mul__is_zyyy,+i_mul+is_zyyy,Linguae multiplīs (Scrīptum incognitō),,,,,
1603:1:51:11,11,90,19,ara-Arab,__i_ara__is_arab,+i_ara+is_arab,Macrolingua Arabica (Abecedarium Arabicum),Q13955,Q8196,ar,arab1395,ara
1603:1:51:12,12,90,19,ben-Beng,__i_ben__is_beng,+i_ben+is_beng,Lingua Bengali (?),Q9610,Q756802,bn,beng1280,ben
1603:1:51:13,13,90,19,grc-Grek,__i_grc__is_grek,+i_grc+is_grek,Lingua Graeca antiqua (Alphabetum Graecum),Q35497,Q8216,grc,anci1242,grc
1603:1:51:14,14,90,19,lat-Latn,__i_lat__is_latn,+i_lat+is_latn,Lingua Latina (Abecedarium Latinum),Q397,Q8229,la,lati1261,lat
1603:1:51:15,15,90,19,rus-Cyrl,__i_rus__is_cyrl,+i_rus+is_cyrl,Lingua Russica (Abecedarium Cyrillicum),Q7737,Q8209,ru,russ1263,rus
1603:1:51:16,16,60,19,san-Zzzz,__i_san__is_zzzz,+i_san+is_zzzz,Lingua Sanscrita,Q11059,,sa,sans1269,san
1603:1:51:100,100,60,19,por-Latn,__i_por__is_latn,+i_por+is_latn,Lingua Lusitana (Abecedarium Latinum),Q5146,Q8229,pt,port1283,por
1603:1:51:101,101,60,19,eng-Latn,__i_eng__is_latn,+i_eng+is_latn,Lingua Anglica (Abecedarium Latinum),Q1860,Q8229,en,stan1293,eng
1603:1:51:102,102,60,19,fra-Latn,__i_fra__is_latn,+i_fra+is_latn,Lingua Francogallica (Abecedarium Latinum),Q150,Q8229,fr,stan1290,fra
Expand Down
159 changes: 87 additions & 72 deletions officinam/999999999/0/1603_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# ./999999999/0/1603_1.py
# NUMERORDINATIO_BASIM="/external/ndata" ./999999999/0/1603_1.py
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_1.py --actionem-quod-sparql
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_1.py --actionem-sparql --query
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_1.py --actionem-sparql --query | ./999999999/0/1603_1.py --actionem-sparql --wikidata-link
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_1.py --actionem-sparql --query | ./999999999/0/1603_1.py --actionem-sparql --tsv > 999999/0/test.tsv
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_1.py --actionem-sparql --query | ./999999999/0/1603_1.py --actionem-sparql --csv > 999999/0/test.csv
Expand Down Expand Up @@ -220,12 +220,14 @@ def est_wikidata_q(self, wikidata_codicem: str):
# }
# }


def query(self):
qid = ['wd:' + x for x in self.qid if isinstance(x, str)]
# select = '?item ' + " ".join(self._query_linguam())

# select = ['(?item AS ?item__conceptum__codicem)']
select = ['(STRAFTER(STR(?item), "entity/") AS ?item__conceptum__codicem)']
select = [
'(STRAFTER(STR(?item), "entity/") AS ?item__conceptum__codicem)']
filter_otional = []
for pair in self.D1613_1_51_langpair:
select.append('?' + pair[1])
Expand Down Expand Up @@ -306,73 +308,86 @@ def make_args(self, hxl_output=True):
# nargs='?'
# )

parser.add_argument(
'--punctum-separato-de-resultatum',
help='Character(s) used as separator for generate output.' +
'Defaults to tab "\t"',
dest='resultatum_separato',
default="\t",
nargs='?'
)
# parser.add_argument(
# '--punctum-separato-de-resultatum',
# help='Character(s) used as separator for generate output.' +
# 'Defaults to tab "\t"',
# dest='resultatum_separato',
# default="\t",
# nargs='?'
# )

neo_codex = parser.add_argument_group(
"sparql",
"(DEFAULT USE) SPARQL query")
hxlcaput = parser.add_argument_group(
"item",
"(DEFAULT USE) Explain one item")

neo_codex.add_argument(
'--actionem-sparql',
help='Define mode to operate with generation of SPARQL ' +
'queries',
hxlcaput.add_argument(
'--actionem-item',
help='Define mode just explain one item',
metavar='',
dest='actionem_sparql',
dest='actionem_item',
const=True,
nargs='?'
)

neo_codex.add_argument(
'--query',
help='Generate SPARQL query',
metavar='',
dest='query',
const=True,
nargs='?'
)
neo_codex.add_argument(
'--wikidata-link',
help='Generate query.wikidata.org link (from piped in query)',
metavar='',
dest='wikidata_link',
const=True,
nargs='?'
)
neo_codex.add_argument(
'--csv',
help='Generate TSV output (from piped in query)',
metavar='',
dest='csv',
const=True,
nargs='?'
)
# neo_codex = parser.add_argument_group(
# "sparql",
# "(DEFAULT USE) SPARQL query")

neo_codex.add_argument(
'--tsv',
help='Generate TSV output (from piped in query)',
metavar='',
dest='tsv',
const=True,
nargs='?'
)
# neo_codex.add_argument(
# '--actionem-sparql',
# help='Define mode to operate with generation of SPARQL ' +
# 'queries',
# metavar='',
# dest='actionem_sparql',
# const=True,
# nargs='?'
# )

neo_codex.add_argument(
'--hxltm',
help='Generate HXL-tagged output (from piped in query). ' +
'Concepts use #item+conceptum+codicem instead ' +
'of #item+code+v_wiki_q',
metavar='',
dest='hxltm',
const=True,
nargs='?'
)
# neo_codex.add_argument(
# '--query',
# help='Generate SPARQL query',
# metavar='',
# dest='query',
# const=True,
# nargs='?'
# )
# neo_codex.add_argument(
# '--wikidata-link',
# help='Generate query.wikidata.org link (from piped in query)',
# metavar='',
# dest='wikidata_link',
# const=True,
# nargs='?'
# )
# neo_codex.add_argument(
# '--csv',
# help='Generate TSV output (from piped in query)',
# metavar='',
# dest='csv',
# const=True,
# nargs='?'
# )

# neo_codex.add_argument(
# '--tsv',
# help='Generate TSV output (from piped in query)',
# metavar='',
# dest='tsv',
# const=True,
# nargs='?'
# )

# neo_codex.add_argument(
# '--hxltm',
# help='Generate HXL-tagged output (from piped in query). ' +
# 'Concepts use #item+conceptum+codicem instead ' +
# 'of #item+code+v_wiki_q',
# metavar='',
# dest='hxltm',
# const=True,
# nargs='?'
# )

# neo_codex.add_argument(
# '--actionem-verbum-simplex',
Expand Down Expand Up @@ -531,18 +546,18 @@ def make_args(self, hxl_output=True):
# nargs='?'
# )

parser.add_argument(
'--verbose',
help='Verbose output',
metavar='verbose',
nargs='?'
)
if hxl_output:
parser.add_argument(
'outfile',
help='File to write (if omitted, use standard output).',
nargs='?'
)
# parser.add_argument(
# '--verbose',
# help='Verbose output',
# metavar='verbose',
# nargs='?'
# )
# if hxl_output:
# parser.add_argument(
# 'outfile',
# help='File to write (if omitted, use standard output).',
# nargs='?'
# )

# print('oioioi', parser)
return parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion officinam/999999999/0/1603_3_12.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# ./999999999/0/1603_3_12.py
# NUMERORDINATIO_BASIM="/external/ndata" ./999999999/0/1603_3_12.py
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_3_12.py --actionem-quod-sparql
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_3_12.py --actionem-sparql --query
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_3_12.py --actionem-sparql --query | ./999999999/0/1603_3_12.py --actionem-sparql --wikidata-link
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_3_12.py --actionem-sparql --query | ./999999999/0/1603_3_12.py --actionem-sparql --tsv > 999999/0/test.tsv
# printf "Q1065\nQ82151\n" | ./999999999/0/1603_3_12.py --actionem-sparql --query | ./999999999/0/1603_3_12.py --actionem-sparql --csv > 999999/0/test.csv
Expand Down
2 changes: 1 addition & 1 deletion officinam/999999999/0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ printf '\n\t\e[1;32m%-6s\e[m\n' "999999999/1603_17.sh"
bash "${ROOTDIR}/999999999/1603_17.sh"

printf '\n\t\e[1;32m%-6s\e[m\n' "999999999/1603_87.sh"
sh "${ROOTDIR}/999999999/1603_87.sh"
bash "${ROOTDIR}/999999999/1603_87.sh"

printf '\n\t\e[1;32m%-6s\e[m\n' "999999999/1603_47_15924.sh"
bash "${ROOTDIR}/999999999/1603_47_15924.sh"
Expand Down

0 comments on commit 32858ae

Please sign in to comment.