Difference between revisions of "EMWConTalk2023-04"

From BITPlan Wiki
Jump to navigation Jump to search
 
(112 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{PageSequence|prev=SMWConTalk2022-10|next=|category=talk|categoryIcon=picture-o}}{{ShowSlides}}
+
{{PageSequence|prev=SMWConTalk2022-10|next=SMWConTalk2024-11|category=talk|categoryIcon=picture-o}}
== Wolfgang Fahl ==
+
__NOTOC__
[[File:WolfgangFahl.png|200px|left|link=https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl|left]]
+
{{NextSlide|1|WolfgangFahl}}
* Computer Scientist
+
{{NextSlide|2|BITPlanGmbH}}
* Expert
+
{{NextSlide|3|Agenda}}
* Trainer for Software Architecture and Requirements Engineering
+
{{{NextSlide|4|SMWWikidataStorage}}
* PhD Candidate at RWTH Aachen i5
+
{{{NextSlide|5|SMWWikidataDatabases}}
 
+
{{{NextSlide|6|SMWRelationalOperators}}
== BITPlan GmbH ==
+
{{{NextSlide|7|ModifyingASingleTriple}}
[[File:BITPlanLogoFontLessTransparent.png|240px|link=http://www.bitplan.com|BITPlan]]
+
{{{NextSlide|8|ExampleUseCases}}
* Inception: 1999


+
{{{NextSlide|9|ExampleRoyalFamily}}
* Focus on Software-Engineering 

Training, Consulting, Projects …
+
{{{NextSlide|10|SyncRoyalFamily}}
* 

Switch from Lotus Notes to 
Semantic Mediawiki in 2013


+
{{{NextSlide|11|ExampleScholarlyCommunication}}
* ProfiWiki since 2015
+
{{{NextSlide|12|SyncEventSeries}}
 
+
{{{NextSlide|13|SyncInstitutions}}
== Agenda ==
+
{{{NextSlide|14|HowSMWSyncWorks}}
* [[File:Wikidata-logo-en.svg|128px]] Wikidata
+
{{{NextSlide|15|SelfDescribingProperties}}
* [[File:20210702 Semantic MediaWiki logo with wordmark.png|128px]]
+
{{{NextSlide|16|MetaModelSiDIFandLinkMl}}
* [[File:Octicons-sync.svg|128px]] Synchronization
+
{{{NextSlide|17|MappingSMWAndWikiDAtaProperties}}
 
+
{{{NextSlide|18|CommandLineTool}}
== SMW CRUD ==
+
{{{NextSlide|19|Todos}}
* Create - create page and use markup to set property
+
{{{NextSlide|20|Links}}
* Read - visit link of page
+
{{{NextSlide|21|QuestionsDiscussion}}
* Update - modify page with edit
 
* Deleate - delete page
 
 
 
== Example Usecases ==
 
* Royal Family
 
* Scholary communication
 
 
 
== Example: Scholary communication ==
 
 
 
http://diagrams.bitplan.com/render/png/0x1a095a5a.png
 
* https://cr.bitplan.com
 
* https://ceur-ws.bitplan.com/index.php/List_of_Institutions
 
 
 
== How SMWSync works ==
 
== Links ==
 
* https://wiki.bitplan.com/index.php/PySMWSync
 
 
 
== Questions / Discussion ==
 
[[File:Bitplanpartner.png]]
 

Latest revision as of 11:09, 4 November 2024


BITPlanLogo2012 138x77.png
Wolfgang Fahl
WolfgangFahl.png
  • Computer Scientist
  • 20210702 Semantic MediaWiki logo with wordmark.png Expert
  • Trainer for Software Architecture and Requirements Engineering
  • PhD Candidate at RWTH Aachen i5
   


BITPlanLogo2012 138x77.png
BITPlan GmbH
BITPlan
  • Inception: 1999


  • Focus on Software-Engineering 

Training, Consulting, Projects …
  • 

Switch from Lotus Notes to 
Semantic Mediawiki in 2013


  • ProfiWiki since 2015
   


BITPlanLogo2012 138x77.png
Agenda
Wikidata-logo-en.svg Wikidata
20210702 Semantic MediaWiki logo with wordmark.png
Octicons-sync.svg Synchronization
   

{

BITPlanLogo2012 138x77.png
SMW and Wikidata storage
  • Both systems use triples: subject, predicate and object
  • It's a girl revisited:
    It's a girl!
The princess of cambridge was born on [[is born::2015-05-03]] 
Her rank inline to the throne is [[throne rank is::4]].
Her mother is [[mother is::Duchess Kate]].
   

{

BITPlanLogo2012 138x77.png
SMW and Wikidata as databases?
Compare to a relational database:    

{

BITPlanLogo2012 138x77.png
SMW relational operations
   

Row and Column definition operations

Caption text
Operation Manually Via Api Via Wikipush
Create create page and use markup to set property edit wikipush, wikiupload, wikirestore
Read visit link of page read html or markup {Done}} wikibackup, wikipush, wikiedit
Update modify page via edit edit wikiedit, wikirestore, wikipush
Delete delete page delete {Done}} wikinuke

Column value operations

Caption text
Operation Manually Via Api Via Wikipush
Create add property value manually on a page ->
Read use ask queries to retrieve property values edit wikiquery
Update modify property value manually on a page ->
Delete remove property value manually on a page

{

BITPlanLogo2012 138x77.png
Modifying a Single triple
wikiedit -t family --template Person --property label --value "Alexandra of Denmark" -p Alexandra_of_Denmark 
editing 1 pages in family (dry run)
1/1 (100.00%): editing Alexandra_of_Denmark ...👍 |childOf=F74
 |parentOf=F2
 |spouse=Q20875
+|label=Alexandra of Denmark
 }}
 [[Category:frontend]]
wikiedit -t family --template Person --property label --value "Alexandra of Denmark" -p Alexandra_of_Denmark -f
editing 1 pages in family (forced)
1/1 (100.00%): editing Alexandra_of_Denmark ...✅
   

{

BITPlanLogo2012 138x77.png
Example Usecases
  • Royal Family
  • Scholary communication
   

{

BITPlanLogo2012 138x77.png
Example Royal Family
Coat of arms of the United Kingdom (2022, variant 2).svg


  • 0xe4ab021a.png
   

{

BITPlanLogo2012 138x77.png
Sync Royal Family
smwsync -u -t family --context FamilyContext --topic Person -p desc label died died_at --progress
updating cache for FamilyContext:Person from wiki family ...
stored 59 Person items to /Users/wf/.smwsync/family/FamilyContext/Person.json
59 Person items to sync ...
William IV of the United Kingdom→died_at: 100%|█████| 236/236 [01:48<00:00,  2.18it/s]
   

{

BITPlanLogo2012 138x77.png
Example: Scholary communication
0x1a095a5a.png    

{

BITPlanLogo2012 138x77.png
Sync Event Series
https://cr.bitplan.com/index.php/List_of_EventSeries
smwsync -u -t cr --topic EventSeries -p desc title home --progress
updating cache for CrSchema:EventSeries from wiki cr ...
stored 10 EventSeries items to /Users/wf/.smwsync/cr/CrSchema/EventSeries.json
10 EventSeries items to sync ...
SGAI→homepage: 100%|██████████████████████████████████| 30/30 [00:28<00:00,  1.05it/s]
   

{

BITPlanLogo2012 138x77.png
Sync Institutions
smwsync -u -t cr --topic Institution -p desc home --progress
updating cache for CrSchema:Institution from wiki cr ...
stored 4 Institution items to /Users/wf/.smwsync/cr/CrSchema/Institution.json
4 Institution items to sync ...
Universität Stuttgart→homepage: 100%|█████████████████| 12/12 [00:12<00:00,  1.06s/it]
   

{

BITPlanLogo2012 138x77.png
How SMWSync works
  • Self describing Properties
  • MetaModel, SiDIF, LinkML
  • Mapping SMW Properties to Wikidata properties
  • Command Line Tool
   

{

BITPlanLogo2012 138x77.png
Self describing Properties
   

{

BITPlanLogo2012 138x77.png
MetaModel, SiDIF, LinkML
YpgenScreenShotFamilyContext2023-04-19.png
ypgen --wikiId family --context FamilyContext --serve --host localhost

FamilyContext SiDIF is in legacy SiDIF triple format.

pyMetaModel mm_cmd command line tool will generate LinkML yaml markup and other target formats. LinkML can then generate even form format see:

pyMetaModel family example files
   

{

BITPlanLogo2012 138x77.png
Mapping SMW Properties to Wikidata properties ==
# list of property mappings
# for family  versus wikidata
- topic: Person
  prop_list:
  - pid: qid
    smw_prop: qid
  - arg: label
    pid: label
    smw_prop: label
  - arg: desc
    pid: description
    pid_label: description
    smw_prop: description
  - arg: died
    pid: P570
    pid_label: date of death
    smw_prop: died
  - arg: died_at
    pid: P20
    pid_label: place of death
    smw_prop: died_at
   

{

BITPlanLogo2012 138x77.png
Command Line Tool
usage: smwsync [-h] [-a] [--context CONTEXT] [-cpm CREATEPROPERTYMAP] [-d] [--dry]
               [-e ENDPOINT] [--progress] [-p PROPS [PROPS ...]] [--proplist]
               [-pm PROPERTYMAP] [-pk PRIMARYKEY]
               [-pkv PRIMARYKEYVALUES [PRIMARYKEYVALUES ...]] [-t TARGET] [-u]
               [--topic TOPIC] [--verbose] [-V]
   

{

BITPlanLogo2012 138x77.png
Todos
  • synchronization of complete entities or sets of properties (--all option for properties)
    • detection of sync conflicts
  • bidirectional sync
    • publish to wikidata from smw
  • GUI
    • Sync dialog
  • generation of smw topics and properties from wikidata
  • mapping information in property definition page
  • support of intext annotation
   

{

BITPlanLogo2012 138x77.png
Links
   

{

BITPlanLogo2012 138x77.png
Questions / Discussion
Bitplanpartner.png