edmcouncil / ontology-publisher

The owl-builder "builds" publishable / deployable versions (and derived products) of a given set of ontologies (such as FIBO)
MIT License
7 stars 6 forks source link

prefixes missing locally #26

Closed VladimirAlexiev closed 2 years ago

VladimirAlexiev commented 4 years ago

This command finds full FIBO URLs used in ontological statements, i.e. missing prefixes in individual ontology files. This is from the full dev distribution in Turtle (not quickstart):

grep -rF '<https://spec.edmcouncil.org' latest | grep -vP '@prefix|@base|imports|baseURI|versionIRI|isDefinedBy|seeAlso|dct:hasPart|^\S+:\s*<[^>]+> *[;,]?\s*$' >prefixes-missing-locally.txt

There are 62 such cases:

latest/BP/Process/FinancialContextAndProcess.ttl:       owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/BP/Process/FinancialContextAndProcess.ttl:   rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/BP/SecuritiesIssuance/IssuanceProcess.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/SecuritiesIdentification/ListedSecurityIdentifier> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/DebtInstruments/TradableDebtInstrument> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:onClass <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/DebtInstruments/TradableDebtInstrument> ;
latest/CAE/CorporateEvents/CorporateActionsEvents.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/CIV/Funds/CIV.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/RealEstate> ;
latest/CIV/Funds/CIV.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/SecuritiesIdentification/SecurityIdentifier> ;
latest/CIV/Funds/CIV.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/Pools/Pool> ;
latest/CIV/Funds/CIV.ttl:   rdfs:range <https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/Pools/Pool> ;
latest/CIV/Funds/CIV.ttl:   rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/RealEstate> ;
latest/DER/AssetDerivatives/EquityForwards.ttl:         owl:onProperty <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/hasUnderlier> ;
latest/DER/CommoditiesDerivatives/CommoditiesContracts.ttl:         owl:onProperty <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/hasUnderlier> ;
latest/DER/DerivativesContracts/Options.ttl:            owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/IND/Indicators/Indicators/MarketRate> ;
latest/DER/DerivativesContracts/Options.ttl:            owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/SettlementTerms> ;
latest/DER/DerivativesContracts/Options.ttl:            owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/SettlementTerms> ;
latest/DER/DerivativesContracts/Options.ttl:    rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/SettlementTerms> ;
latest/DER/DerivativesContracts/Options.ttl:    rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/SettlementTerms> ;
latest/DER/DerivativesContracts/RightsAndWarrants.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/Underlier> ;
latest/DER/DerivativesContracts/RightsAndWarrants.ttl:  rdfs:subPropertyOf <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/hasUnderlier> ;
latest/DER/DerivativesContracts/RightsAndWarrants.ttl:  rdfs:subPropertyOf <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/hasUnderlier> ;
latest/DER/DerivativesContracts/RightsAndWarrants.ttl:  rdfs:range <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/Underlier> ;
latest/DER/ExchangeTradedDerivatives/ExchangeTradedOptions.ttl:         owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/IND/ForeignExchange/ForeignExchange/CurrencySpotBuyRate> ;
latest/DER/ExchangeTradedDerivatives/Futures.ttl:           owl:onProperty <https://spec.edmcouncil.org/fibo/ontology/MD/DerivativesTemporal/FuturesTemporal/hasAccountHolder> ;
latest/DER/ExchangeTradedDerivatives/Futures.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/MD/DerivativesTemporal/FuturesTemporal/FuturesTradingAccountHolder> ;
latest/DER/ExchangeTradedDerivatives/Futures.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/DebtInstruments/TradableDebtInstrument> ;
latest/DER/FxDerivatives/FxContracts.ttl:       owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/IND/ForeignExchange/ForeignExchange/QuotedExchangeRate> ;
latest/DER/FxDerivatives/FxContracts.ttl:   rdfs:subClassOf <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/DerivativeInstrument> ;
latest/DER/FxDerivatives/FxContracts.ttl:   rdfs:range <https://spec.edmcouncil.org/fibo/ontology/IND/ForeignExchange/ForeignExchange/QuotedExchangeRate> ;
latest/DER/FxDerivatives/FxSpots.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/IND/ForeignExchange/ForeignExchange/CurrencySpotBuyRate> ;
latest/DER/FxDerivatives/FxSpots.ttl:   rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/SettlementTerms> ;
latest/FND/TransactionsExt/SecuritiesTransactions.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/LOAN/LoanContracts/LoanCore.ttl: rdfs:subClassOf <https://spec.edmcouncil.org/fibo/ontology/FND/Law/LegalCapacity/LicenseIdentifier> ;
latest/LOAN/LoansTemporal/LoansEvents.ttl:      owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/RealEstate> ;
latest/LOAN/LoanTypes/LoanProducts.ttl:         owl:onProperty <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/isEmbodiedIn> ;
latest/LOAN/LoanTypes/LoanProducts.ttl:         owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/DebtAndEquities/CreditFacilities/LoanPrecedentConditions> ;
latest/LOAN/LoanTypes/LoanProducts.ttl:         owl:onProperty <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/isEmbodiedIn> ;
latest/LOAN/LoanTypes/LoanProducts.ttl: rdfs:range <https://spec.edmcouncil.org/fibo/ontology/FBC/DebtAndEquities/CreditFacilities/LoanPrecedentConditions> ;
latest/LOAN/LoanTypes/LoanProducts.ttl: rdfs:domain <https://spec.edmcouncil.org/fibo/ontology/FND/ProductsAndServices/ProductsAndServices/Product> ;
latest/MD/DebtTemporal/DebtAnalytics.ttl:           owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/DebtInstruments/TradableDebtInstrument> ;
latest/MD/DerivativesTemporal/ETOptionsTemporal.ttl:    rdfs:subClassOf <https://spec.edmcouncil.org/fibo/ontology/IND/Indicators/Indicators/Volatility> ;
latest/MD/TemporalCore/SecurityCreditStatuses.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/MD/TemporalCore/SecurityTradingStatuses.ttl:         owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/MD/TemporalCore/SecurityTradingStatuses.ttl:         owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/Security> ;
latest/SEC/Debt/AssetBackedSecurities/AssetBackedSPVs.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/AssetBackedSecurities/PoolBackedSecurities/SecuritizedDebtPool> ;
latest/SEC/Debt/AssetBackedSecurities/AssetBackedSPVs.ttl:          owl:someValuesFrom <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/AssetBackedSecurities/PoolBackedSecurities/SecuritizedDebtPool> ;
latest/SEC/Debt/AssetBackedSecurities/PoolBackedSecurities.ttl:         owl:onProperty <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/AssetBackedSecurities/AssetBackedSecurities/definesTermsFor> ;
latest/SEC/Debt/AssetBackedSecurities/PoolBackedSecurities.ttl: rdfs:range <https://spec.edmcouncil.org/fibo/ontology/BP/SecuritiesIssuance/PrivateLabelMBSIssuance/PoolLifecycleStateSelection> ;
latest/SEC/Equities/DepositaryReceipts.ttl: rdfs:subClassOf <https://spec.edmcouncil.org/fibo/ontology/FBC/FunctionalEntities/FinancialServicesEntities/Bank> ;

They involve 17 prefixes:

@prefix fibo-bp-iss-pmbs:    <https://spec.edmcouncil.org/fibo/ontology/BP/SecuritiesIssuance/PrivateLabelMBSIssuance/> .
@prefix fibo-der-drc-bsc:    <https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/> .
@prefix fibo-fbc-dae-crf:    <https://spec.edmcouncil.org/fibo/ontology/FBC/DebtAndEquities/CreditFacilities/> .
@prefix fibo-fbc-fi-fi:      <https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/> .
@prefix fibo-fbc-fct-fse:    <https://spec.edmcouncil.org/fibo/ontology/FBC/FunctionalEntities/FinancialServicesEntities/> .
@prefix fibo-fbc-pas-fpas:   <https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/> .
@prefix fibo-fnd-law-lcap:   <https://spec.edmcouncil.org/fibo/ontology/FND/Law/LegalCapacity/> .
@prefix fibo-fnd-plc-loc:    <https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/> .
@prefix fibo-fnd-pas-pas:    <https://spec.edmcouncil.org/fibo/ontology/FND/ProductsAndServices/ProductsAndServices/> .
@prefix fibo-ind-fx-fx:      <https://spec.edmcouncil.org/fibo/ontology/IND/ForeignExchange/ForeignExchange/> .
@prefix fibo-ind-ind-ind:    <https://spec.edmcouncil.org/fibo/ontology/IND/Indicators/Indicators/> .
@prefix fibo-md-der-fut:     <https://spec.edmcouncil.org/fibo/ontology/MD/DerivativesTemporal/FuturesTemporal/> .
@prefix fibo-sec-dbt-ab-abs: <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/AssetBackedSecurities/AssetBackedSecurities/> .
@prefix fibo-sec-dbt-ab-pbs: <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/AssetBackedSecurities/PoolBackedSecurities/> .
@prefix fibo-sec-dbt-dbti:   <https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/DebtInstruments/> .
@prefix fibo-sec-sec-pls:    <https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/Pools/> .
@prefix fibo-sec-sec-id:     <https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/SecuritiesIdentification/> .
VladimirAlexiev commented 4 years ago

As suggested in edmcouncil/fibo#992, it's better to use prefixed names also in the following statements, which are filtered out by the above command: imports|versionIRI|isDefinedBy|seeAlso|dct:hasPart

ElisaKendall commented 4 years ago

Hi Vladimir,

These are all in provisional ontologies. Just wanted to let you know it's still on my radar.

Elisa

carmenchui commented 4 years ago

Hi @ElisaKendall,

I did not want to create a new issue about this but I do have a question about the Namespace Prefixes on this FIBO page (https://spec.edmcouncil.org/fibo/ontology-tools): is there anywhere where we can get the full list of the FIBO DEV/provisional prefixes?

Thanks, Carmen

ElisaKendall commented 4 years ago

Hi @carmenchui ,

I -think- there may be a tool that collects them all for the publication pipeline, but I'm not positive about that. @dallemang might know and could point you in that direction if so. I agree it's helpful to have this for SPARQL queries, among other things.

Best,

Elisa

mereolog commented 3 years ago

@carmenchui I think that the current list on https://spec.edmcouncil.org/fibo/ontology-tools contains all FIBO Dev prefixes.