GithubHelp home page GithubHelp logo

crystal-pool / graywing Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3.78 MB

A rudimentary Crystal Pool SPARQL Query Service.

Home Page: https://crystalpool.cxuesong.com/wiki/Special:MyLanguage/Project:SPARQL_query_service

License: MIT License

C# 32.34% JavaScript 1.97% TypeScript 42.92% CSS 0.93% HTML 4.38% PowerShell 17.46%
warrior-cats wikibase sparql-query

graywing's Introduction

Gray Wing

Queries facts in SPARQL.

A rudimentary Crystal Pool Query service. This is the successor of GrayWing-Prolog, which allows you to query for entities & relations about Warriors, a fiction series authored by Erin Hunter. With SPARQL query language, performing more complex query is possible.

The live site is https://q.crystalpool.cxuesong.com/. You may query for what we have on Crystal Pool with SPAQL query language.

If you are new to this, note that Crystal Pool uses Wikibase, the same MediaWiki extension as in Wikidata. You may found their SPARQL language guide on Wikibooks. Basically the query syntax and even the namespace prefixes are the same with Wikidata. (I haven't figure out how to change the prefixes in a easy fashion for now. Oops. Later wd: might be replaced with cp:)

Crystal Pool is a structured knowledge-base for Warriors. The site is still constructing in progress; thus most of the relations are not available for query. For now it just include most of the kinship & allegiances. If you would like to improve Crystal Pool Wiki, consider requesting for an account. Thank you.

See also

SPARQL query examples

The following query will show you all the cats who belongs or used to belong to ThunderClan, as well as their English labels (aka. names) and genders.

SELECT ?cat ?name ?gender WHERE {
  ?cat    wdt:P3      wd:Q622;       # should be fictional cat character
          wdt:P76     wd:Q627.       # should belong to ThunderClan
  OPTIONAL {
    ?cat    rdfs:label  ?name.
    FILTER(lang(?name) = "en")
  }
  OPTIONAL {
    ?cat    wdt:P78     ?gender.
  }
}

Build & deploy

  1. git clone the whole repository

  2. Navigate to graywing-client directory. Ensure you have installed npm & Angular CLI. Use the following command to restore the packages and build the client site webpages

    npm install
    ng build --prod
  3. Navigate to GrayWing project directory. Configure the configurations. You need to create a appsettings._private.json file, with the following content

    {
      "UseReverseProxy": true,		// Whether the site is behind a reverse proxy. Set to true to prevent unnecessary redirects.
      "ApplicationInsights": {
        "InstrumentationKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"	// AI instrumentation key.
      },
      "ApplicationInsightsStorageFolder": "/tmp/aistorage"	// AI storage folder on non-Windows OS
    }
  4. Build / publish the project using

    dotnet build -c Release
    # or
    dotnet publish -c Release

graywing's People

Contributors

cxuesong avatar

Watchers

 avatar  avatar

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.