abrupt 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.rubocop.yml +16 -0
  4. data/.travis.yml +34 -0
  5. data/Gemfile +4 -0
  6. data/Guardfile +51 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +36 -0
  9. data/Rakefile +7 -0
  10. data/abrupt.gemspec +41 -0
  11. data/assets/rules/datatypes/cax-RequiredFormElement.ttl +34 -0
  12. data/assets/rules/datatypes/cax-readability.ttl +18 -0
  13. data/assets/rules/datatypes/cax-required.ttl +15 -0
  14. data/assets/rules/list/prp-hasState.ttl +10 -0
  15. data/assets/rules/production/non_required_form_element.ttl +24 -0
  16. data/assets/rules/production/state_has_no_html_element.ttl +21 -0
  17. data/assets/schema/schema.json +49 -0
  18. data/assets/schema/v1/complexity.json +142 -0
  19. data/assets/schema/v1/input.json +1136 -0
  20. data/assets/schema/v1/link.json +41 -0
  21. data/assets/schema/v1/picture.json +47 -0
  22. data/assets/schema/v1/readability.json +51 -0
  23. data/assets/schema/v1/subject.json +88 -0
  24. data/assets/voc/tbox.ttl +1632 -0
  25. data/bin/abrupt +63 -0
  26. data/doc/paper/listings/datatype_rule.ttl +0 -0
  27. data/doc/paper/listings/description_logic_infered.ttl +3 -0
  28. data/doc/paper/listings/description_logic_rule.ttl +15 -0
  29. data/doc/paper/listings/inconsistency_rule.ttl +0 -0
  30. data/doc/paper/listings/limitations.ttl +10 -0
  31. data/doc/paper/listings/production_rule.ttl +0 -0
  32. data/doc/paper/listings/propositional_logic_infered.ttl +6 -0
  33. data/doc/paper/listings/propositional_logic_rule.ttl +15 -0
  34. data/doc/paper/listings/unique_nested_uris.ttl +10 -0
  35. data/doc/paper/literature.bib +56 -0
  36. data/doc/paper/main.tex +322 -0
  37. data/doc/poster/Poster.key +0 -0
  38. data/doc/poster/Poster.pdf +0 -0
  39. data/doc/poster/poster.indd +0 -0
  40. data/doc/poster/resources/graph.graffle +0 -0
  41. data/doc/poster/resources/graph.png +0 -0
  42. data/doc/poster/resources/graph_crop.png +0 -0
  43. data/lib/abrupt.rb +90 -0
  44. data/lib/abrupt/converter.rb +130 -0
  45. data/lib/abrupt/crawler.rb +125 -0
  46. data/lib/abrupt/service/absolute_url.rb +32 -0
  47. data/lib/abrupt/service/base.rb +75 -0
  48. data/lib/abrupt/service/complexity.rb +27 -0
  49. data/lib/abrupt/service/input.rb +15 -0
  50. data/lib/abrupt/service/link.rb +15 -0
  51. data/lib/abrupt/service/picture.rb +19 -0
  52. data/lib/abrupt/service/readability.rb +26 -0
  53. data/lib/abrupt/service/subject.rb +19 -0
  54. data/lib/abrupt/transformation/base.rb +145 -0
  55. data/lib/abrupt/transformation/client/base.rb +8 -0
  56. data/lib/abrupt/transformation/client/page_view.rb +27 -0
  57. data/lib/abrupt/transformation/client/visit.rb +56 -0
  58. data/lib/abrupt/transformation/client/visitor.rb +19 -0
  59. data/lib/abrupt/transformation/website/base.rb +8 -0
  60. data/lib/abrupt/transformation/website/complexity.rb +20 -0
  61. data/lib/abrupt/transformation/website/input.rb +42 -0
  62. data/lib/abrupt/transformation/website/link.rb +27 -0
  63. data/lib/abrupt/transformation/website/picture.rb +26 -0
  64. data/lib/abrupt/transformation/website/readability.rb +15 -0
  65. data/lib/abrupt/transformation/website/subject.rb +22 -0
  66. data/lib/abrupt/version.rb +7 -0
  67. data/spec/cassettes/Abrupt_Crawler/outputs_correct_hash.yml +91250 -0
  68. data/spec/converter_spec.rb +34 -0
  69. data/spec/crawler_spec.rb +11 -0
  70. data/spec/factories/crawled_hashes.rb +468 -0
  71. data/spec/fixtures/rikscha-mainz.owl +17456 -0
  72. data/spec/fixtures/rikscha.ohneBilder.2013-04-30_2013-08-17.xml +51759 -0
  73. data/spec/fixtures/rikscha.ohneBilder.2013-04-30_2013-08-17_min.xml +81 -0
  74. data/spec/fixtures/rikscha_Result.xml +11594 -0
  75. data/spec/fixtures/rikscha_Result_min.xml +574 -0
  76. data/spec/spec_helper.rb +26 -0
  77. data/spec/transformation/base_spec.rb +18 -0
  78. data/spec/transformation/website/complexity_spec.rb +188 -0
  79. data/spec/transformation/website/input_spec.rb +181 -0
  80. data/spec/transformation/website/link_spec.rb +13 -0
  81. data/spec/transformation/website/picture_spec.rb +20 -0
  82. data/spec/transformation/website/readability_spec.rb +22 -0
  83. data/spec/transformation/website/subject_spec.rb +40 -0
  84. metadata +424 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8981df36b20e57578610722464f6eac1de4aa745
4
+ data.tar.gz: dfaa93f9a542ed01df760b4303a4a35f3de13a8a
5
+ SHA512:
6
+ metadata.gz: cf98a340f655e83bf2509d4086e5682cb283cee2a2d9738f15c91af9069ffa9447b8578eea18795383aa2c8e14d253844aa7ed3e3f01af04e0e919dd4eba99b8
7
+ data.tar.gz: c9bc55bb43b5ab2628b32c66812f96f8ab4bf39e395e189d3eb1ff07b551e4e3ef59dc727b330ae018aa283e2c26b4d505ceb6a3e3457e7b5a4f8d5bf7a5d012
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ lib/bundler/man
11
+ pkg
12
+ rdoc
13
+ spec/reports
14
+ test/tmp
15
+ test/version_tmp
16
+ tmp
17
+ *.bundle
18
+ *.so
19
+ *.o
20
+ *.a
21
+ mkmf.log
22
+ .idea
@@ -0,0 +1,16 @@
1
+ AllCops:
2
+ Include:
3
+ - '**/aburupt.gemspec'
4
+ Exclude:
5
+ - spec/factories/*.rb
6
+ - bin/*
7
+ Style/IndentHash:
8
+ Description: 'Checks the indentation of the first key in a hash literal.'
9
+ Enabled: false
10
+ Metrics/MethodLength:
11
+ Max: 15
12
+ Description: 'Avoid methods longer than 15 lines of code.'
13
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
14
+ Enabled: true
15
+ Metrics/AbcSize:
16
+ Max: 16
@@ -0,0 +1,34 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
4
+ - 2.1.5
5
+ #- jruby-18mode
6
+ # - jruby-19mode
7
+ # - rbx-2
8
+ # - ruby-head
9
+ #- jruby-head
10
+ #- ree
11
+
12
+ env:
13
+ #
14
+
15
+ services:
16
+ #
17
+
18
+ before_install:
19
+ - gem update --system
20
+ - gem --version
21
+
22
+ before_script:
23
+ # - bundle exec rake db:setup
24
+
25
+ script:
26
+ - bundle exec rubocop lib spec -c .rubocop.yml
27
+ - bundle exec rake # doing rspec
28
+
29
+ after_script:
30
+ # - bundle exec rake db:setup
31
+
32
+ addons:
33
+ code_climate:
34
+ repo_token: d88b1f8e253a70c58d685384637fc7b1768fc3fb74dac98c29ca2fb119744c8d
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in abrupt.gemspec
4
+ gemspec
@@ -0,0 +1,51 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec feature)
6
+
7
+ ## Uncomment to clear the screen before every task
8
+ # clearing :on
9
+
10
+ ## Guard internally checks for changes in the Guardfile and exits.
11
+ ## If you want Guard to automatically start up again, run guard in a
12
+ ## shell loop, e.g.:
13
+ ##
14
+ ## $ while bundle exec guard; do echo "Restarting Guard..."; done
15
+ ##
16
+ ## Note: if you are using the `directories` clause above and you are not
17
+ ## watching the project directory ('.'), the you will want to move the Guardfile
18
+ ## to a watched dir and symlink it back, e.g.
19
+ #
20
+ # $ mkdir config
21
+ # $ mv Guardfile config/
22
+ # $ ln -s config/Guardfile .
23
+ #
24
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
25
+
26
+ # Note: The cmd option is now required due to the increasing number of ways
27
+ # rspec may be run, below are examples of the most common uses.
28
+ # * bundler: 'bundle exec rspec'
29
+ # * bundler binstubs: 'bin/rspec'
30
+ # * spring: 'bin/rspec' (This will use spring if running and you have
31
+ # installed the spring binstubs per the docs)
32
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
33
+ # * 'just' rspec: 'rspec'
34
+
35
+ guard :rspec, cmd: "bundle exec rspec" do
36
+ require "guard/rspec/dsl"
37
+ dsl = Guard::RSpec::Dsl.new(self)
38
+
39
+ # Feel free to open issues for suggestions and improvements
40
+
41
+ # RSpec files
42
+ rspec = dsl.rspec
43
+ watch(rspec.spec_helper) { rspec.spec_dir }
44
+ watch(rspec.spec_support) { rspec.spec_dir }
45
+ watch(rspec.spec_files)
46
+
47
+ # Ruby files
48
+ ruby = dsl.ruby
49
+ dsl.watch_spec_files_for(ruby.lib_files)
50
+
51
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Manuel Dudda
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,36 @@
1
+ # Abrupt
2
+ [![Build Status](https://travis-ci.org/manuel84/abrupt.svg?branch=master)](https://travis-ci.org/manuel84/abrupt)
3
+ [![Code Climate](https://codeclimate.com/github/manuel84/abrupt/badges/gpa.svg)](https://codeclimate.com/github/manuel84/abrupt)
4
+ [![Test Coverage](https://codeclimate.com/github/manuel84/abrupt/badges/coverage.svg)](https://codeclimate.com/github/manuel84/abrupt)
5
+
6
+ Tools for the AbRUPt project, see [http://wba.cs.hs-rm.de/AbRUPt/service/](http://wba.cs.hs-rm.de/AbRUPt/service/)
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'abrupt'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install abrupt
21
+
22
+ ## Usage
23
+
24
+ For converting owl file from xml use:
25
+
26
+ ```shell
27
+ abrupt convert spec/fixtures/rikscha_Result_min.xml spec/fixtures/rikscha.ohneBilder.2013-04-30_2013-08-17_min.xml --output tmp/out.ttl --format turtle
28
+ ```
29
+
30
+ ## Contributing
31
+
32
+ 1. Fork it ( https://github.com/[my-github-username]/abrupt/fork )
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create a new Pull Request
@@ -0,0 +1,7 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new('spec')
5
+
6
+ # If you want to make this the default task
7
+ task :default => :spec
@@ -0,0 +1,41 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'abrupt/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'abrupt'
8
+ spec.version = Abrupt::VERSION
9
+ spec.authors = ['Manuel Dudda']
10
+ spec.email = ['dudda@paij.de']
11
+ spec.summary = 'Tools for the AbRUPt project.'
12
+ spec.description = 'Tools for the AbRUPt project.'
13
+ spec.homepage = 'https://github.com/manuel84/abrupt'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+ spec.add_runtime_dependency 'rest-client', '~> 1.7'
21
+ spec.add_runtime_dependency 'nokogiri', '~> 1.6'
22
+ spec.add_runtime_dependency 'addressable', '~> 2.3'
23
+ spec.add_runtime_dependency 'commander', '~> 4.2'
24
+ spec.add_runtime_dependency 'gyoku', '~> 1.2'
25
+ spec.add_runtime_dependency 'rdf', '~> 1.1'
26
+ spec.add_runtime_dependency 'linkeddata', '~> 1.1'
27
+ spec.add_runtime_dependency 'rdf-rdfxml', '~> 1.1'
28
+ spec.add_runtime_dependency 'rdf-raptor', '~> 1.2'
29
+ spec.add_runtime_dependency 'json-schema', '~> 2.4'
30
+ spec.add_runtime_dependency 'activesupport', '~> 4.1'
31
+
32
+ spec.add_development_dependency 'bundler', '~> 1.6'
33
+ spec.add_development_dependency 'rake', '~> 10.3'
34
+ spec.add_development_dependency 'rubocop', '~> 0.26'
35
+ spec.add_development_dependency 'rspec', '~> 3.1'
36
+ spec.add_development_dependency 'vcr', '~> 2.9'
37
+ spec.add_development_dependency 'webmock', '~> 1.20'
38
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
39
+ spec.add_development_dependency 'factory_girl', '~> 4.5'
40
+ spec.add_development_dependency 'guard-rspec', '~> 4.5'
41
+ end
@@ -0,0 +1,34 @@
1
+ @prefix : <http://wba.cs.hs-rm.de/AbRUPt/> .
2
+ @base <http://wba.cs.hs-rm.de/AbRUPt/> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+
9
+ :RequiredFormElement a owl:Class;
10
+ rdfs:subClassOf :FormElement .
11
+
12
+ [
13
+ a owl:Restriction;
14
+ rdfs:subClassOf :RequiredFormElement;
15
+ owl:onDataRange xsd:boolean;
16
+ owl:onProperty :required;
17
+ owl:hasValue true
18
+ ] .
19
+
20
+ [
21
+ a owl:Restriction;
22
+ rdfs:subClassOf :RequiredFormElement;
23
+ owl:onDataRange xsd:string;
24
+ owl:onProperty :name;
25
+ owl:hasValue "agb"
26
+ ] .
27
+
28
+ [
29
+ a owl:Restriction;
30
+ rdfs:subClassOf :RequiredFormElement;
31
+ owl:onDataRange xsd:string;
32
+ owl:onProperty :name;
33
+ owl:hasValue "toc"
34
+ ] .
@@ -0,0 +1,18 @@
1
+ @prefix : <http://wba.cs.hs-rm.de/AbRUPt/> .
2
+ @base <http://wba.cs.hs-rm.de/AbRUPt/> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+
9
+ [
10
+ a owl:Restriction;
11
+ rdfs:subClassOf :Problem;
12
+ owl:onProperty :readability;
13
+ owl:someValuesFrom [
14
+ a rdfs:Datatype;
15
+ owl:onDatatype xsd:decimal;
16
+ owl:withRestrictions ([ xsd:minInclusive 7.0])
17
+ ]
18
+ ] .
@@ -0,0 +1,15 @@
1
+ @prefix : <http://wba.cs.hs-rm.de/AbRUPt/> .
2
+ @base <http://wba.cs.hs-rm.de/AbRUPt/> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+
9
+ [
10
+ a owl:Restriction;
11
+ rdfs:subClassOf :Problem;
12
+ owl:minQualifiedCardinality "2"^^xsd:nonNegativeInteger;
13
+ owl:onDataRange xsd:boolean;
14
+ owl:onProperty :required
15
+ ] .
@@ -0,0 +1,10 @@
1
+ @prefix : <http://wba.cs.hs-rm.de/AbRUPt/> .
2
+ @base <http://wba.cs.hs-rm.de/AbRUPt/> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+
9
+ :hasStateThrough a owl:ObjectProperty;
10
+ owl:propertyChainAxiom ( :hasPage :hasState ) .
@@ -0,0 +1,24 @@
1
+ @prefix : <http://wba.cs.hs-rm.de/AbRUPt/> .
2
+ @base <http://wba.cs.hs-rm.de/AbRUPt/> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+
9
+ :NonRequiredFormElement owl:intersectionOf
10
+ (:FormElement
11
+ [
12
+ a owl:Restriction;
13
+ owl:onProperty :required;
14
+ owl:allValuesFrom owl:Nothing
15
+ ]
16
+ ) .
17
+
18
+ [
19
+ a owl:Restriction;
20
+ rdfs:subClassOf :NonRequiredFormElement;
21
+ owl:onDataRange xsd:boolean;
22
+ owl:onProperty :required;
23
+ owl:hasValue false
24
+ ] .
@@ -0,0 +1,21 @@
1
+ @prefix : <http://wba.cs.hs-rm.de/AbRUPt/> .
2
+ @base <http://wba.cs.hs-rm.de/AbRUPt/> .
3
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
4
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5
+ @prefix xml: <http://www.w3.org/XML/1998/namespace> .
6
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
8
+
9
+ # nicht mit Oberrolen möglich
10
+ # [ a owl:Restriction ;
11
+ # rdfs:subClassOf abrupt:Problem ;
12
+ # owl:onProperty abrupt:hasHtmlElement ;
13
+ # owl:cardinality 0
14
+ # ] .
15
+
16
+
17
+ [ a owl:Restriction ;
18
+ rdfs:subClassOf :Problem ;
19
+ owl:onProperty :hasLink ;
20
+ owl:cardinality 0
21
+ ] .
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "required": ["website"],
5
+ "properties": {
6
+ "website": {
7
+ "description": "Website as root element",
8
+ "required": ["domain", "url"],
9
+ "type": "object",
10
+ "properties": {
11
+ "domain": {
12
+ "description": "Domain",
13
+ "required": true,
14
+ "type": "string"
15
+ },
16
+ "url": {
17
+ "description": "All Pages as Objects",
18
+ "type": "array",
19
+ "minItems": 1,
20
+ "required": true,
21
+ "items": {
22
+ "description": "Page Item",
23
+ "type": "object",
24
+ "required": ["name", "state"],
25
+ "properties": {
26
+ "name": {
27
+ "description": "URL name",
28
+ "type": "string",
29
+ "required": true
30
+ },
31
+ "state": {
32
+ "description": "State",
33
+ "type": "object",
34
+ "required": ["name", "readability"],
35
+ "properties": {
36
+ "name": {
37
+ "description": "State name",
38
+ "type": "string",
39
+ "required": true
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,142 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "required": false,
5
+ "properties": {
6
+ "complexity": {
7
+ "description": "",
8
+ "type": "object",
9
+ "required": false,
10
+ "properties": {
11
+ "contrast": {
12
+ "description": "",
13
+ "type": "object",
14
+ "properties": {
15
+ "_1": {
16
+ "description": "",
17
+ "type": "object",
18
+ "required": false,
19
+ "properties": {
20
+ "A_tag_With_Low_Contrast": {
21
+ "description": "",
22
+ "type": "string"
23
+ },
24
+ "TextNodes_With_Low_Contrast": {
25
+ "description": "",
26
+ "type": "string"
27
+ },
28
+ "paragrahps_with_too_long_lines": {
29
+ "description": "",
30
+ "type": "string"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "vizweb": {
37
+ "description": "",
38
+ "type": "object",
39
+ "properties": {
40
+ "numberOfLeaves": {
41
+ "description": "",
42
+ "type": "integer"
43
+ },
44
+ "textArea": {
45
+ "description": "",
46
+ "type": "string"
47
+ },
48
+ "numberOfTextGroups": {
49
+ "description": "",
50
+ "type": "integer"
51
+ },
52
+ "visualComplexity": {
53
+ "description": "",
54
+ "type": "number"
55
+ },
56
+ "numberOfImageAreas": {
57
+ "description": "",
58
+ "type": "integer"
59
+ },
60
+ "hue": {
61
+ "description": "",
62
+ "type": "number"
63
+ },
64
+ "horizontalSymmetry": {
65
+ "description": "",
66
+ "type": "string"
67
+ },
68
+ "horizontalBalance": {
69
+ "description": "",
70
+ "type": "string"
71
+ },
72
+ "colorfulness": {
73
+ "description": "",
74
+ "type": "number"
75
+ },
76
+ "nontextArea": {
77
+ "description": "",
78
+ "type": "number"
79
+ }
80
+ }
81
+ },
82
+ "differenceMatrix": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "object",
86
+ "properties": {
87
+ "matrix": {
88
+ "description": "",
89
+ "type": "number"
90
+ },
91
+ "palette": {
92
+ "description": "",
93
+ "type": "number"
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "vicram": {
99
+ "type": "object",
100
+ "properties": {
101
+ "complexity": {
102
+ "type": "number"
103
+ }
104
+ }
105
+ },
106
+ "ratios": {
107
+ "type": "object",
108
+ "properties": {
109
+ "pageSize": {
110
+ "type": "object",
111
+ "properties": {
112
+ "pageSize_in_pixel_squared": {
113
+ "type": "integer"
114
+ },
115
+ "pageWidth_in_pixel": {
116
+ "type": "integer"
117
+ },
118
+ "pageHeight_in_pixel": {
119
+ "type": "integer"
120
+ }
121
+ }
122
+ },
123
+ "img_Tag": {
124
+ "type": "object",
125
+ "properties": {
126
+ "img_Area_in_pixel_squared": {
127
+ "type": "integer"
128
+ },
129
+ "img_document_tag_percentage": {
130
+ "type": "number"
131
+ },
132
+ "img_document_tag_ratio": {
133
+ "type": "number"
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }