Giter VIP home page Giter VIP logo

pysotsog's Introduction

pysotsog

python Library for Scholars to achieve "Standing on the shoulders of giants - with direct access to the clouds" Join the discussion at https://github.com/WolfgangFahl/pysotsog/discussions pypi Github Actions Build PyPI Status GitHub issues GitHub closed issues License

Introduction

pysotsog is a python library for scholars to help navigate the conceptual knowledge graph consisting of

  • authors
  • organizations
  • papers
  • scientific events
  • scientific event series

Docs and Tutorials

Wiki

Demo

sotsog Demo at https://sotsog.bitplan.com

Example search

UCLA
Tim Berners-Lee
We Need a Magna Carta for the Internet
Wikidata Workshop 2022
VNC 2019
Proceedings of the 35th International Workshop on Description Logics (DL 2022)
COVID-19

Search Demo

pysotsog's People

Contributors

tholzheim avatar wolfgangfahl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pysotsog's Issues

add crossref api search

see #17

@article{Lamy_2017,
	doi = {10.1016/j.artmed.2017.07.002},
	url = {https://doi.org/10.1016%2Fj.artmed.2017.07.002},
	year = 2017,
	month = {jul},
	publisher = {Elsevier {BV}},
	volume = {80},
	pages = {11--28},
	author = {Jean-Baptiste Lamy},
	title = {Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies},
	journal = {Artificial Intelligence in Medicine}
}

add entity type selection for search

"Scholar": Concept(name="Scholar",cls=Scholar),
            "Institution": Concept(name="Institution",cls=Institution),
            "Paper": Concept(name="Paper",cls=Paper),
            "Event": Concept(name="Event",cls=Event),
            "EventSeries": Concept(name="EventSeries",cls=EventSeries),
            "Proceedings": Concept(name="Proceedings",cls=Proceedings),
            # neighbour concepts
            "Country": Concept(name="Country",cls=Country)

add settings to skgbrowser

e.g. to add support for local semantic mediawiki
use ceur-ws.bitplan.com as public showcase and start with Institution so that Institution searches will show CEUR-WS results

add ptp compatibility

Make sure http://ptp.bitplan.com is redirected to http//sotsog.bitplan.com and

git reset --hard a20623cc8ce7f74cf6d153af0f99074186a39f05
# activate virtual environment
python3.9 -m venv .venv
source .venv/bin/activate
useroption=""

add event concept

sotsog Wikidata Workshop 2022

The Third Wikidata Workshop(Q112055391):Wikidata Workshop 2022✅
Event The Third Wikidata Workshop:
  wikiDataId=http://www.wikidata.org/entity/Q112055391
  title=The 3rd Wikidata Workshop
  location=http://www.wikidata.org/entity/Q4970
  point_in_time=2022-10-24 00:00:00
  official_website=https://wikidataworkshop.github.io/2022/
opening https://scholia.toolforge.org/event/Q112055391 in browser

Add paper/work concept to search

sotsog Integrating GoodRelations in a domain-specific ontology
Integrating GoodRelations in a domain-specific ontology(Q110767508):✅
Paper Integrating GoodRelations in a domain-specific ontology:
  wikiDataId=http://www.wikidata.org/entity/Q110767508
  DOI=10.3233/AO-170184
  publication_date=2017-11-02 00:00:00
opening https://scholia.toolforge.org/work/Q110767508 in browser

https://scholia.toolforge.org/work/Q110767508

add Proceedings

sotsog Proceedings of the 3rd Wikidata Workshop 2022

Proceedings of the 3rd Wikidata Workshop 2022(Q115053286):Proceedings of Wikidata 2022 workshop✅
Proceedings➜Proceedings of the 3rd Wikidata Workshop 2022:
  wikiDataId=http://www.wikidata.org/entity/Q115053286
  short_name=Wikidata 2022
  title=Proceedings of the 3rd Wikidata Workshop 2022
  publication_date=2022-11-03 00:00:00
  full_work_available_at_URL=http://ceur-ws.org/Vol-3262/
opening https://scholia.toolforge.org/venue/Q115053286 in browser

Manual Python build lacks binary

I've built pysotsog with

	python -m build --wheel --no-isolation
	python -m installer --destdir="$pkgdir" dist/*.whl

and I'm getting a structure

    └── usr
        └── lib
            └── python3.10
                └── site-packages
                    ├── skg
                    │   ├── citeproc.py

but where is the binary to run ./pysotsog ?

add limit option

make sure the default wikidata search entities limit may be modified

add Institution

sotsog RWTH

RWTH Aachen University(Q273263):university in Aachen, Germany✅
Institution➜RWTH Aachen University:
  wikiDataId=http://www.wikidata.org/entity/Q273263
  short_name=RWTH Aachen
  inception=1870-10-10 00:00:00
  country=http://www.wikidata.org/entity/Q183
  image=http://commons.wikimedia.org/wiki/Special:FilePath/1196-18-rwth-aachen-hg-von-hendrik-brixius.jpg
  located_in=http://www.wikidata.org/entity/Q1017
  official_website=http://www.rwth-aachen.de
opening https://scholia.toolforge.org/organization/Q273263 in browser

add local webui

--serve option for command line should start a local webserver and open it depending on the nobrowser argument option

add dblp schema analysis

This is too complicated:

query="""PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?prop ?domain ?label { 
  ?prop a rdf:Property . 
  ?prop rdfs:domain ?domain.
  ?prop rdfs:label ?label .
}"""
        result=self.dblp.query_schema(query,formats="triples")
        entities={}
        prefix="https://dblp.org/rdf/schema#"
        for prop_t,domain_r,label_r in result:
            domain=domain_r.replace(prefix,"")
            if domain in entities:
                entity=entities[domain]
            else:
                entity={}
                entities[domain]=entity
            prop_name=prop_t.replace(prefix,"")  
            prop_label=label_r.replace(prefix,"")
            prop={}  
            prop["name"]=prop_name
            prop["label"]=prop_label
            entity[prop_name]=prop
        print(json.dumps(entities,indent=2))       
  

add sotsog command line

sotsog Tim Berners-Lee
Tim Berners-Lee(Q80):English computer scientist, inventor of the World Wide Web (born 1955)✅
Scholar Tim Berners-Lee:
  wikiDataId=http://www.wikidata.org/entity/Q80
  gndId=121649091
  dblpId=b/TimBernersLee
  orcid=0000-0003-1279-3709
opening https://scholia.toolforge.org/author/Q80 in browser

add #scite support for SemanticCite Mediawiki extension

Support https://github.com/SemanticMediaWiki/SemanticCite

Example:

sotsog owlready

Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies(Q38371991):scientific article✅
Paper➜Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies:
  wikiDataId=http://www.wikidata.org/entity/Q38371991
  DOI=10.1016/J.ARTMED.2017.07.002
  DBLP_publication_ID=journals/artmed/Lamy17
  publication_date=2017-08-14 00:00:00
opening https://scholia.toolforge.org/work/Q38371991 in browser
{{#scite:
 |reference=lamy2017ow
 |type=journal-article
 |title=Owlready: Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies
 |author=Jean-Baptiste Lamy
 |journal=Artificial Intelligence in Medicine
 |publisher=Elsevier BV
 |year=2017
 |volume=80
 |pages=11-28
 |doi=10.1016/j.artmed.2017.07.002
 |subject=Artificial Intelligence;Medicine (miscellaneous)|+sep=;
 |issn=0933-3657
 |retrieved-from=https://dx.doi.org/
 |retrieved-on=2022-11-17
 |@show=true
}}```

scite markup does not work for certain dois by springer

PHP tool of the Semantic Cite extension gives:

{{#scite:
 |reference=kiryakov2005ow
 |type=book-chapter
 |title=OWLIM – A Pragmatic Semantic Repository for OWL
 |author=Atanas Kiryakov;Damyan Ognyanov;Dimitar Manov|+sep=;
 |journal=Web Information Systems Engineering – WISE 2005 Workshops
 |publisher=Springer Berlin Heidelberg
 |year=2005
 |pages=182-192
 |doi=10.1007/11581116_19
 |issn=0302-9743;1611-3349|+sep=;
 |retrieved-from=https://dx.doi.org/
 |retrieved-on=2022-11-26
 |@show=true
}}

while sotsog shows a red link

alllow querying scholar by ORCID

 def test_scholar_by_orcid(self):
        """
        test searching a scholar/author by ORCID
        """
        orcid_examples=[
            {
                "ORCID": "0000-0003-1279-3709"
            }
        ]
        debug=self.debug
        debug=True
        skg_def=SKG_Def()
        for orcid_example in orcid_examples:
            orcid=orcid_example["ORCID"]
            scholars=Scholar.from_wikidata_via_id(skg_def.concepts["Scholar"],"orcid",orcid)
            if debug:
                for scholar in scholars:
                    print(scholar)
            self.assertEqual(1,len(scholars))
            self.assertEqual("Tim Berners-Lee",scholars[0].label)

add wikidata generic query support

generate SPARQL queries from mappings e.g.

# Query for scholar details via orcid
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?scholar ?wikiDataId ?gndId ?dblpId ?googleScholarUser ?linkedInId ?orcid ?homepage 
WHERE {
  VALUES ?orcid {
    "0000-0003-1279-3709"
  }
  ?wikiDataId wdt:P496 ?orcid.
  ?wikiDataId wdt:P31 wd:Q5.
  ?wikiDataId rdfs:label ?scholar .
  FILTER(LANG(?scholar)="en").
  OPTIONAL{ ?wikiDataId wdt:P227 ?gndId.}
  OPTIONAL{ ?wikiDataId wdt:P2456 ?dblpId.}
  OPTIONAL{ ?wikiDataId wdt:P1960 ?googleScholarUser.}
  OPTIONAL{ ?wikiDataId wdt:P6634 ?linkedInId.}
  OPTIONAL{ ?wikiDataId wdt:P856 ?homepage.}
}

try it

add search engine support

Handle red link results via search engines
Example:
LinkClus: efficient clustering via heterogeneous semantic links

test_searchengines (tests.test_searchengine.TestSearchEngine)
test search engines ... Starting test test_searchengines, debug=False ...
Yahoo
[{'descriptions': 'Most current clustering methods rely only on the properties '
                  'that belong to the objects per se. However, the '
                  'similarities between objects are often indicated by the '
                  'links, and desirable clusters cannot be generated using '
                  'only the properties of objects.In this paper we explore '
                  'linkage-based clustering, in which the similarity between '
                  'two objects is measured based on the similarities between '
                  'the objects linked with them.',
  'links': 'https://www.semanticscholar.org/paper/LinkClus%253A-efficient-clustering-via-heterogeneous-Yin-Han/4b15027c951168f6e6fe2307dac1c15b87a77ea7',
  'titles': 'www.semanticscholar.org › paper › LinkClus:-efficientLinkClus: '
            'efficient clustering via heterogeneous semantic links'},
 {'descriptions': 'An efficient algorithm is proposed to compute similarities '
                  'between ob- jects by avoiding pairwise similarity '
                  'computations through merging computations that go through '
                  'the same branches in the...',
  'links': 'https://www.researchgate.net/publication/200110771_LinkClus_efficient_clustering_via_heterogeneous_semantic_links',
  'titles': 'www.researchgate.net › publication › 200110771LinkClus: efficient '
            'clustering via heterogeneous semantic links'},
 {'descriptions': 'Based on SimTree, we propose LinkClus, an efficient and '
                  'accurate approach for linkage-based clustering. At the '
                  'be-ginning LinkClus builds a SimTree for each type of '
                  'objects in abottom-upmanner, '
                  'byfindinggroupsofobjects(orgroups of lower level nodes) that '
                  'are similar to each other. Because inter-object similarity '
                  'is not available yet, the similarity be-',
  'links': 'http://hanj.cs.illinois.edu/pdf/vldb06_linkclus.pdf',
  'titles': 'hanj.cs.illinois.edu › pdf › vldb06_linkclusLinkClus: Efficient '
            'Clustering via Heterogeneous Semantic Links'},
 {'descriptions': 'Most current clustering methods rely only on the properties '
                  'that belong to the objects per se. However, the '
                  'similarities between objects are often indicated by the '
                  'links, and desirable clusters cannot be generated using '
                  'only the properties of objects.In this paper we explore '
                  'linkage-based clustering, in which the similarity between '
                  'two objects is measured based on the similarities between '
                  'the objects linked with them.',
  'links': 'https://typeset.io/papers/linkclus-efficient-clustering-via-heterogeneous-semantic-3rhbgx745a',
  'titles': 'typeset.io › papers › linkclus-efficient-clusteringLinkClus: '
            'efficient clustering via heterogeneous semantic links'}]
Bing
[{'descriptions': "Home Conferences VLDB Proceedings VLDB '06 LinkClus: "
                  'efficient clustering via heterogeneous semantic links. '
                  'Article . Share on. LinkClus: efficient clustering via …',
  'links': 'https://dl.acm.org/doi/10.5555/1182635.1164165',
  'titles': 'LinkClus: efficient clustering via heterogeneous semantic links'},
 {'descriptions': 'Links contain rich semantic information that may indicate '
                  'important relationships among objects. Most current '
                  'clustering methods rely only on the properties that belong '
                  'to the objects per se. …',
  'links': 'https://www.semanticscholar.org/paper/LinkClus%3A-efficient-clustering-via-heterogeneous-Yin-Han/4b15027c951168f6e6fe2307dac1c15b87a77ea7',
  'titles': 'LinkClus: efficient clustering via heterogeneous semantic links'},
 {'descriptions': '01.01.2006\xa0· An efficient algorithm is proposed to '
                  'compute similarities between ob- jects by avoiding pairwise '
                  'similarity computations through merging computations that '
                  'go through the …',
  'links': 'https://www.researchgate.net/publication/200110771_LinkClus_efficient_clustering_via_heterogeneous_semantic_links',
  'titles': 'LinkClus: efficient clustering via heterogeneous semantic links'},
 {'descriptions': 'Based on SimTree, we propose LinkClus, an efficient and '
                  'accurate approach for linkage-based clustering. At the '
                  'be-ginning LinkClus builds a SimTree for each type of '
                  'objects in abottom …',
  'links': 'http://hanj.cs.illinois.edu/pdf/vldb06_linkclus.pdf',
  'titles': 'LinkClus: Efficient Clustering via Heterogeneous Semantic Links'},
 {'descriptions': 'Links contain rich semantic information that may indicate '
                  'important relationships among objects. Most current '
                  'clustering methods rely only on the properties that belong '
                  'to the objects per se. …',
  'links': 'https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.111.4090',
  'titles': 'CiteSeerX — LinkClus: Efficient clustering via heterogeneous …'},
 {'descriptions': 'Links contain rich semantic information that may indicate '
                  'important relationships among objects. Most current '
                  'clustering methods rely only on the properties that belong '
                  'to the objects per se. …',
  'links': 'https://core.ac.uk/display/24613900',
  'titles': 'LinkClus: Efficient clustering via heterogeneous semantic links'},
 {'descriptions': 'LinkClus: efficient clustering via heterogeneous semantic '
                  "links. X. Yin, J. Han, and P. Yu. VLDB '06: Proceedings of "
                  'the 32nd international conference on Very large data bases '
                  ', page …',
  'links': 'https://www.bibsonomy.org/bibtex/21bd4bf36a2409d4332b811c5ff7a9e12/chato?lang=en',
  'titles': 'LinkClus: efficient clustering via heterogeneous semantic links'},
 {'descriptions': 'LinkClus: Efficient cl... × Publication title. Zitation zur '
                  'lokalen Zwischenablage hinzufügen. Schließen. Kopieren '
                  'Löschen Diese Publikation zur Ablage hinzufügen. '
                  'Community-Eintrag; …',
  'links': 'https://www.bibsonomy.org/bibtex/22076058436f0906be83a070739c36f23/nijkamp?lang=de',
  'titles': 'LinkClus: Efficient clustering via heterogeneous semantic links'},
 {'descriptions': 'Link. Clus: Efficient Clustering via Heterogeneous Semantic '
                  'Links Int. Conf. on Very Large Data Bases (VLDB’ 06) X. '
                  'Yin, J. Han and P. S. Yu Junho Park Chungbuk National '
                  'University …',
  'links': 'https://slidetodoc.com/link-clus-efficient-clustering-via-heterogeneous-semantic-links-3/',
  'titles': 'Link Clus Efficient Clustering via Heterogeneous Semantic Links'},
 {'descriptions': 'LinkClus: Efficient cl... × Publication title. Copy '
                  'citation to your local clipboard. close. copy delete add '
                  'this publication to your clipboard. community post; history '
                  'of this post; URL; DOI; BibTeX; …',
  'links': 'https://www.bibsonomy.org/bibtex/22076058436f0906be83a070739c36f23/nijkamp',
  'titles': 'LinkClus: Efficient clustering via heterogeneous semantic links'}]

add Videos for some examples

UCLA
Tim Berners-Lee
We Need a Magna Carta for the Internet
Wikidata Workshop 2022
VNC 2019
Proceedings of the 35th International Workshop on Description Logics (DL 2022)
COVID-19

A-animated

add dblp paper search

PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT 
  ?paper 
  (SAMPLE(?doi_o) as ?doi)
  (SAMPLE(?title_o) as ?title)
  (MIN(?year_o) as ?year)
  (GROUP_CONCAT(?author_o) as ?authors)
  (SAMPLE(?publishedin_o) as ?publishedin)
WHERE {
  ?paper dblp:title ?title_o .
  ?paper dblp:doi ?doi_o .
  ?paper dblp:authoredBy ?author_o.
  ?paper dblp:publishedIn ?publishedin_o .
  ?paper dblp:yearOfPublication ?year_o.
}
GROUP BY ?paper
ORDER BY DESC(?year)
LIMIT 10

try it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.