<commit_before><!DOCTYPE html>
<html>
    <head>
        <title>VIE &mdash; Vienna IKS Editables</title>
        <link rel="stylesheet" href="style/vie.css" />
        <link rel="shortcut icon" href="style/iks_favicon.ico" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
        <script src="js/vendor/underscore.min.js"></script>
        <script src="js/vendor/backbone.min.js"></script>
        <script src="js/vendor/jquery.rdfquery.min.js"></script>
        <script src="js/vie-2.0.0alpha1.js"></script>
        <script src="js/vie-examples.js"></script>
    </head>
    <body xmlns:doap="http://usefulinc.com/ns/doap#" about="http://viejs.org/#vie" typeof="doap:Project">
        <a href="https://github.com/bergie/VIE" rel="doap:homepage"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/71eeaab9d563c2b3c590319b398dd35683265e85/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub"></a>
        <header>
            <img src="style/vie.png" class="logo" alt="VIE" />
            <h1><span property="doap:name">VIE</span> &mdash; <span property="doap:shortdesc">Vienna IKS Editables</span></h1>       
        </header>
        <div class="content">
            <article>
                <p property="doap:description">VIE is a JavaScript library for implementing <a href="http://bergie.iki.fi/blog/decoupling_content_management/">decoupled Content Management Systems</a> and semantic interaction in web applications.</p>

                <h2>What can VIE do for your application?</h2>

                <p>VIE can do quite a bit to make applications smarter. If you're looking for simple in-page editing, check out the VIE-powered <a href="http://createjs.org/">Create UI</a>. Otherwise, open the examples below:</p>

                <div id="features">
                    <h3><a href="#">Get enhancements for element content</a></h3>
                    <div id="analyze">
                        <p>Given the following contents:</p>
                        <blockquote class="analyze">
Until September 2008, European policy measures were limited to a small number of countries (Spain and Italy). In both countries, the measures were dedicated to households (tax rebates) reform of the taxation system to support specific sectors such as housing. The European Commission proposed a &euro;200 billion stimulus plan to be implemented at the European level by the countries. At the beginning of 2009, the UK and Spain completed their initial plans, while Germany announced a new plan.
                        </blockquote>
                        <p>This code can get you analysis:</p>
                        <div class="exampleholder">
                            <textarea>
var v = new VIE();
v.use(
    new v.StanbolService({
        url: "http://dev.iks-project.eu/stanbolfull",
        proxyDisabled: true
    })
);
v.analyze({
    element: jQuery('#analyze blockquote')
}).using('stanbol').execute().done(function(entities) {
    jQuery('#analyze .resultsholder').append(
        jQuery('<p>We found ' + entities.length + ' entities, including:</p>')
    );
    _.each(entities, function(entity) {
        if (!entity.has('rdfschema:label')) {
            return true;
        }

        var url = entity.id.substr(1, entity.id.length - 2);
        var label;
        _.each(entity.get('rdfschema:label'), function(labelLang) {
            if (labelLang.substr(-2) === 'en') {
                label = labelLang.substr(2, labelLang.length - 7);
            }
        });
        jQuery('#analyze .resultsholder').append(
            jQuery('<a href="' + url + '">' + label + '</a>')
        );
    });
});
                            
                            </textarea>
                            <button>Run</button>
                        </div>
                        <div class="resultsholder"></div>
                    </div>
                    <h3><a href="#">Tell you how tall is the Eiffel tower</a></h3>
                    <div id="towerheight">
                        <p>This code answers the question:</p>
                        <div class="exampleholder">
                            <textarea>
var eiffel = "http://dbpedia.org/resource/Eiffel_Tower";
var heightByYear = '<http://dbpedia.org/property/years>';
var v = new VIE();
v.use(
    new v.DBPediaService()
);
v.load({
    entity : eiffel
}).using("dbpedia").execute().done(function (a) {
    _.each(a, function (entity, key) { 
        if (entity.id !== '<' + eiffel + '>') {
            return true; 
        }
        var height = {
            year: entity.get(heightByYear)[0],
            height: entity.get(heightByYear)[1],
        }
        height.height = height.height.substr(2, 7);
        jQuery('#towerheight .resultsholder').append(
            jQuery("<p>Eiffel Tower, at " + height.year + " was " + height.height + " tall. We also know " + Object.keys(entity.attributes).length + " other facts about the tower.</p>")
        );
    });
});
                            </textarea>
                            <button>Run</button>
                        </div>
                        <div class="resultsholder"></div>
                    </div>
                </div>
            </article>

            <div id="moreinfo">
                <ul class="nav">
                    <li><a href="#widgets">Widgets</a></li>
                    <li><a href="#documentation">Documentation</a></li>
                    <li><a href="#integrating">Integrating VIE</a></li>
                    <li><a href="#development">Development</a></li>
                </ul>
                <article id="widgets">
                    <h2>VIE widgets</h2>
<commit_msg>Figure out the capital of Mongolia<commit_after><!DOCTYPE html>
<html>
    <head>
        <title>VIE &mdash; Vienna IKS Editables</title>
        <link rel="stylesheet" href="style/vie.css" />
        <link rel="shortcut icon" href="style/iks_favicon.ico" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
        <script src="js/vendor/underscore.min.js"></script>
        <script src="js/vendor/backbone.min.js"></script>
        <script src="js/vendor/jquery.rdfquery.min.js"></script>
        <script src="js/vie-2.0.0alpha1.js"></script>
        <script src="js/vie-examples.js"></script>
    </head>
    <body xmlns:doap="http://usefulinc.com/ns/doap#" about="http://viejs.org/#vie" typeof="doap:Project">
        <a href="https://github.com/bergie/VIE" rel="doap:homepage"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/71eeaab9d563c2b3c590319b398dd35683265e85/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub"></a>
        <header>
            <img src="style/vie.png" class="logo" alt="VIE" />
            <h1><span property="doap:name">VIE</span> &mdash; <span property="doap:shortdesc">Vienna IKS Editables</span></h1>       
        </header>
        <div class="content">
            <article>
                <p property="doap:description">VIE is a JavaScript library for implementing <a href="http://bergie.iki.fi/blog/decoupling_content_management/">decoupled Content Management Systems</a> and semantic interaction in web applications.</p>

                <h2>What can VIE do for your application?</h2>

                <p>VIE can do quite a bit to make applications smarter. If you're looking for simple in-page editing, check out the VIE-powered <a href="http://createjs.org/">Create UI</a>. Otherwise, open the examples below:</p>

                <div id="features">
                    <h3><a href="#">Get enhancements for element content</a></h3>
                    <div id="analyze">
                        <p>Given the following contents:</p>
                        <blockquote class="analyze">
Until September 2008, European policy measures were limited to a small number of countries (Spain and Italy). In both countries, the measures were dedicated to households (tax rebates) reform of the taxation system to support specific sectors such as housing. The European Commission proposed a &euro;200 billion stimulus plan to be implemented at the European level by the countries. At the beginning of 2009, the UK and Spain completed their initial plans, while Germany announced a new plan.
                        </blockquote>
                        <p>This code can get you analysis:</p>
                        <div class="exampleholder">
                            <textarea>
var v = new VIE();
v.use(
    new v.StanbolService({
        url: "http://dev.iks-project.eu/stanbolfull",
        proxyDisabled: true
    })
);
v.analyze({
    element: jQuery('#analyze blockquote')
}).using('stanbol').execute().done(function(entities) {
    jQuery('#analyze .resultsholder').append(
        jQuery('<p>We found ' + entities.length + ' entities, including:</p>')
    );
    _.each(entities, function(entity) {
        if (!entity.has('rdfschema:label')) {
            return true;
        }

        var url = entity.id.substr(1, entity.id.length - 2);
        var label;
        _.each(entity.get('rdfschema:label'), function(labelLang) {
            if (labelLang.substr(-2) === 'en') {
                label = labelLang.substr(2, labelLang.length - 7);
            }
        });
        jQuery('#analyze .resultsholder').append(
            jQuery('<a href="' + url + '">' + label + '</a>')
        );
    });
});
                            
                            </textarea>
                            <button>Run</button>
                        </div>
                        <div class="resultsholder"></div>
                    </div>
                    <h3><a href="#">Tell you how tall is the Eiffel tower</a></h3>
                    <div id="towerheight">
                        <p>This code answers the question:</p>
                        <div class="exampleholder">
                            <textarea>
var eiffel = "http://dbpedia.org/resource/Eiffel_Tower";
var heightByYear = '<http://dbpedia.org/property/years>';
var v = new VIE();
v.use(
    new v.DBPediaService()
);
v.load({
    entity : eiffel
}).using("dbpedia").execute().done(function (a) {
    _.each(a, function (entity, key) { 
        if (entity.id !== '<' + eiffel + '>') {
            return true; 
        }
        var height = {
            year: entity.get(heightByYear)[0],
            height: entity.get(heightByYear)[1],
        }
        height.height = height.height.substr(2, 7);
        jQuery('#towerheight .resultsholder').append(
            jQuery("<p>Eiffel Tower, at " + height.year + " was " + height.height + " tall. We also know " + Object.keys(entity.attributes).length + " other facts about the tower.</p>")
        );
    });
});
                            </textarea>
                            <button>Run</button>
                        </div>
                        <div class="resultsholder"></div>
                    </div>
                    <h3><a href="#">Find you what is the capital of Mongolia</a></h3>
                    <div id="mongolia">
                        <p>This code digs out the answer:</p>
                        <div class="exampleholder">
                            <textarea>
var vie = new VIE();
vie.use(new vie.DBPediaService());

var mongoliaURI = "<http://dbpedia.org/resource/Mongolia>";
var capitalPropURI = "<http://dbpedia.org/property/capital>";
var namePropURI = "rdfschema:label";

vie
.load({entity : mongoliaURI})
.using('dbpedia')
.execute()
.done(function (entities) {
    _.each(entities, function (e) {
        if (e.id === mongoliaURI) {
            var capitalURI = e.get(capitalPropURI).id;
            vie
            .load({entity : capitalURI})
            .using('dbpedia')
            .execute()
            .done(function(capitalEntities) {
                _.each(capitalEntities, function(entity) {
                    if (entity.id != capitalURI) {
                        return true;
                    }
                    var url = entity.id.substr(1, entity.id.length - 2);
                    var label;
                    _.each(entity.get('rdfschema:label'), function(labelLang) {
                        if (labelLang.substr(-2) === 'en') {
                            label = labelLang.substr(2, labelLang.length - 7);
                        }
                    });

                    jQuery('#mongolia .resultsholder').append(
                        jQuery('<p>The capital of Mongolia is <a href="' + url + '">' + label + '</a>.</p>')
                    );
                });
            });
        }
   });
});
                        </textarea>
                        <button>Run</button>
                    </div>
                    <div class="resultsholder"></div>
                </div>
            </article>

            <div id="moreinfo">
                <ul class="nav">
                    <li><a href="#widgets">Widgets</a></li>
                    <li><a href="#documentation">Documentation</a></li>
                    <li><a href="#integrating">Integrating VIE</a></li>
                    <li><a href="#development">Development</a></li>
                </ul>
                <article id="widgets">
                    <h2>VIE widgets</h2>

{'fraction_non_alphanumeric': 0.14599492569771658, 'fraction_numerical': 0.027473722363175062, 'mean_word_length': 1.90136698212408, 'pattern_counts': {'":': 0, '<': 256, '<?xml version=': 0, '>': 256, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '162924', 'n_tokens_mistral': 4275, 'n_tokens_neox': 3903, 'n_words': 868}