weso / yashe Goto Github PK
View Code? Open in Web Editor NEWYet Another ShEx Editor.
Home Page: http://www.weso.es/YASHE/
License: MIT License
Yet Another ShEx Editor.
Home Page: http://www.weso.es/YASHE/
License: MIT License
It seems that the import keyword is not accepted?
The import keyword is part of the grammar. See production rule: [4½] in http://shex.io/shex-semantics/index.html#shexc
Still missing some small parts of the grammar that are not LL(1)
The folder doc
contains some html files which seem to be out-of-date as they refer to queries instead of ShEx schemas.
Internally, there are also some methods like storeQuery
which should be renamed to avoid confusion.
Upload Button Tooltip is wrong
Make a ShEx Pretty Print
The following code:
<S> {
<p> . {1,3}
}
gives a false error in the cardinality.
var yashe = YASHE.fromTextArea(document.getElementById('texAreaId'), {
fontSize:30
});
Fontsize option is not working
YASHE main button is wrong in the Docs page.
Maybe I should remove the "About" button too... I think it´s unnecessary
I use YASHE a lot to verify the structure of the ShEx I write. I typically copy and paste between the Wikidata editor and YASHE.
However, today I wrote a ShEx which contains an IMPORT. However, when checked on YASHE, an error was given.
Would it be possible to support IMPORT in YASHE?
Allow the '.' in PN_LOCAL in order to do thinks like "codes:good.~"
Example 44 Validating RDF Data Book:
prefix codes: <http://example.codes/>
:Product {
:status [ codes:good.~ codes:bad.~ ]
}
Linked Isue (shexSpec/shex#99)
Upgrade all the dependencies to the last version to avoid warnings.
This input
<#sequence_assembly> {
( p:P2576 { ps:P2576 xsd:string } |
ps:P4333 {xsd:string p:P4333 } )
}
Produces this output after call the prettyprinter:
<#sequence_assembly> {
( p:P2576 {
ps:P2576 xsd:string } xsd:string p:P4333
}| ps:P4333 { )
}
Currently, the pretty-printer takes all of the directives and starts and sets them at the top of the document. This is wrong because it can affect to the semantic of the document.
It might be good to make some YASHE releases
By a shortcut or something like that, add Wikidata comments automatically after an entity or property.
Eg:
Before:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
<human> {
wdt:P19 . ?;
wdt:P569 . ? ;
wdt:P735 . * ;
wdt:P734 . * ;
wdt:P106 . * ;
wdt:P27 @<country> *;
wdt:P22 @<human> *;
wdt:P25 @<human> *;
wdt:P3373 @<human> *;
wdt:P26 @<human> *;
wdt:P40 @<human> *;
wdt:P1038 @<human> *;
}
After:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
<human> {
wdt:P19 . ?; # place of birth
wdt:P569 . ? ; # date of birth
wdt:P735 . * ; # given name
wdt:P734 . * ; # family name
wdt:P106 . * ; # occupation
wdt:P27 @<country> *; # country of citizenship
wdt:P22 @<human> *; # father
wdt:P25 @<human> *; # mother
wdt:P3373 @<human> *; # sibling
wdt:P26 @<human> *; # spouse
wdt:P40 @<human> *; # children
wdt:P1038 @<human> *; # relatives
}
There is a Codepen example for YASHE initialization that we can incorporate to YASHE docs page
The shapes autocompleter doesn't work with nonprefixed shapes until a prefixed shape is defined
E.g: 'Base has already been declared'
Annotations has stopped working:
dct:language [ wd:Q9035 ]
// rdf:label "language"
// rdf:comment "The language of lexeme must be Danish." ;
I think the new REGEXP token is to blame...
Change the share button on dark theme
Make some test using cypress
Add Wikidata Examples to the YASHE homepage
YASHE does not recognize well regular expressions.
Example 38 Validating RDF Data Book:
:Product {
schema:name xsd:string MaxLength 10 ;
schema:weight xsd:decimal MinInclusive 1 MaxInclusive 200 ;
schema:sku /^[A-Z0-9]{10,20}$/ ; }
Grammar Rule -> [63] REGEXP
A time out was added on yashe.on("change") to fix some bugs.
Maybe the timeout is not needed with yashe.on("changes") that was deleted
It does not recognize things like this:
:SpanishW3CPeople {
schema:telephone [ "+34"~ ] ;
schema:url [ http://www.W3C.es/Personal~ ]
}
This should throw an error:
:Product (
schema:name
Before PrettyPrint:
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
<human> {
wdt:P31 { wd:Q5 #asd
. }
}
After PrettyPrint: (wrong output)
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
<human> {
wdt:P31 { wd:Q5 . #asd }
}
On the dark mode is already implemented
If a ShapeRef uses a non defined prefix, show prefix error and non defined shape error together.
In the Wikidata demo, when you hover over a predicate in a TripleExpression, it fetches the schema:description
. Does it pick the language based on browser preferences?
It would be cool to extend this functionality by adding annotations to shapes as well, e.g.
<#P352_uniprot_id> {
ps:P352 LITERAL ;
prov:wasDerivedFrom IRI;
}
// schema:description "UniProt identifier"@en
// schema:description "identificador de UniProt"@es # just a guess
The editor could hide all of them except those in the preferred language so it wouldn't get to messy.
Prefixes Collapse doesn't work
Actual 'a' keyword is case insensitive and it shouldn't
Publish YASHE as an npm package
For some reason, the wikibase autocompleter doesn't work inside ValueSets
Document YASHE events:
yashe.on("upload")
yashe.on("download")
...
There is no information about how to download/build the system.
Add some releases that can be downloaded, maybe from a CDN or from NPM as with YASQE
The "Fork me on GitHub" button is wrong in the docs page. I suppose that I forgot to change the href from YASQE
There is a mistake on the rule [22] of the [shex11-grammar.pl] :(https://github.com/weso/YASHE/blob/gh-pages/lib/grammar/shex11-grammar.pl).
[22] nodeConstraint ::= "LITERAL" stringFacet*
Should be:
[22] nodeConstraint ::= "LITERAL" xsFacet*
If you are typing in capital letters and try to autocomplete it doesn't work
For example:
p -> prefix 👍
P -> 👎
In the features section:
In the used by section:
Modify the current token colors to adapt them to ShEx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.