Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sucs-site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sucssite
sucs-site
Compare revisions
67c8f9e0d206de8c3ad403c245116f3646f4be8f to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
sucssite/sucs-site
Select target project
No results found
master
Select Git revision
Branches
beta
master
sucs-site
Swap
Target
eggnog/sucs-site
Select target project
osian/sucs-site
kais58/sucs-site
imranh/sucs-site
foshjedi2004/sucs-site
gigosaurus/sucs-site
matstn/sucs-site
ripp_/sucs-site
eggnog/sucs-site
sucssite/sucs-site
elbows/sucs-site
realitykiller/sucs-site
crox/sucs-site
vectre/sucs-site
welshbyte/sucs-site
paperclipman/sucs-site
15 results
67c8f9e0d206de8c3ad403c245116f3646f4be8f
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/venus/examples/filters/categories/categories.xslt
+0
-82
0 additions, 82 deletions
lib/venus/examples/filters/categories/categories.xslt
lib/venus/examples/filters/guess-language/README
+0
-37
0 additions, 37 deletions
lib/venus/examples/filters/guess-language/README
with
0 additions
and
119 deletions
Some changes are not shown.
For a faster browsing experience, only
2 of 322+
files are shown.
lib/venus/examples/filters/categories/categories.xslt
deleted
100644 → 0
View file @
67c8f9e0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY categoryTerm "WebSemantique">
]>
<!--
This transformation is released under the same licence as Python
see http://www.intertwingly.net/code/venus/LICENCE.
Author: Eric van der Vlist <vdv@dyomedea.com>
This transformation is meant to be used as a filter that determines if
Atom entries are relevant to a specific topic and adds the corresonding
<category/> element when it is the case.
This is done by a simple keyword matching mechanism.
To customize this filter to your needs:
1) Replace WebSemantique by your own category name in the definition of
the categoryTerm entity above.
2) Review the "upper" and "lower" variables that are used to convert text
nodes to lower case and replace common ponctuation signs into spaces
to check that they meet your needs.
3) Define your own list of keywords in <d:keyword/> elements. Note that
the leading and trailing spaces are significant: "> rdf <" will match rdf
as en entier word while ">rdf<" would match the substring "rdf" and
"> rdf<" would match words starting by rdf. Also note that the test is done
after conversion to lowercase.
To use it with venus, just add this filter to the list of filters, for instance:
filters= categories.xslt guess_language.py
-->
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:atom=
"http://www.w3.org/2005/Atom"
xmlns=
"http://www.w3.org/2005/Atom"
xmlns:d=
"http://ns.websemantique.org/data/"
exclude-result-prefixes=
"d atom"
version=
"1.0"
>
<xsl:variable
name=
"upper"
>
,.;AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÀàÁáÂâÃãÄäÅåÆæÇçÈèÉéÊêËëÌìÍíÎîÏïÐðÑñÒòÓóÔôÕõÖöØøÙùÚúÛûÜüÝýÞþ
</xsl:variable>
<xsl:variable
name=
"lower"
>
aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzaaaaaaaaaaaaææcceeeeeeeeiiiiiiiiððnnooooooooooøøuuuuuuuuyyþþ
</xsl:variable>
<d:keywords>
<d:keyword>
wiki semantique
</d:keyword>
<d:keyword>
wikis semantiques
</d:keyword>
<d:keyword>
web semantique
</d:keyword>
<d:keyword>
websemantique
</d:keyword>
<d:keyword>
semantic web
</d:keyword>
<d:keyword>
semweb
</d:keyword>
<d:keyword>
rdf
</d:keyword>
<d:keyword>
owl
</d:keyword>
<d:keyword>
sparql
</d:keyword>
<d:keyword>
topic map
</d:keyword>
<d:keyword>
doap
</d:keyword>
<d:keyword>
foaf
</d:keyword>
<d:keyword>
sioc
</d:keyword>
<d:keyword>
ontology
</d:keyword>
<d:keyword>
ontologie
</d:keyword>
<d:keyword>
dublin core
</d:keyword>
</d:keywords>
<xsl:template
match=
"@*|node()"
>
<xsl:copy>
<xsl:apply-templates
select=
"@*|node()"
/>
</xsl:copy>
</xsl:template>
<xsl:template
match=
"atom:entry/atom:updated"
>
<xsl:copy>
<xsl:apply-templates
select=
"@*|node()"
/>
</xsl:copy>
<xsl:variable
name=
"concatenatedText"
>
<xsl:for-each
select=
"../atom:title|../atom:summary|../atom:content|../atom:category/@term"
>
<xsl:text>
</xsl:text>
<xsl:value-of
select=
"translate(., $upper, $lower)"
/>
</xsl:for-each>
<xsl:text>
</xsl:text>
</xsl:variable>
<xsl:if
test=
"document('')/*/d:keywords/d:keyword[contains($concatenatedText, .)]"
>
<category
term=
"WebSemantique"
/>
</xsl:if>
</xsl:template>
<xsl:template
match=
"atom:category[@term='&categoryTerm;']"
/>
</xsl:stylesheet>
This diff is collapsed.
Click to expand it.
lib/venus/examples/filters/guess-language/README
deleted
100644 → 0
View file @
67c8f9e0
This filter is released under the same licence as Python
see http://www.intertwingly.net/code/venus/LICENCE.
Author: Eric van der Vlist <vdv@dyomedea.com>
This filter guesses whether an Atom entry is written
in English or French. It should be trivial to chose between
two other languages, easy to extend to more than two languages
and useful to pass these languages as Venus configuration
parameters.
The code used to guess the language is the one that has been
described by Douglas Bagnall as the Python recipe titled
"Language detection using character trigrams"
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/326576.
To add support for a new language, this language must first be
"learned" using learn-language.py. This learning phase is nothing
more than saving a pickled version of the Trigram object for this
language.
To learn Finnish, you would execute:
$ ./learn-language.py http://gutenberg.net/dirs/1/0/4/9/10492/10492-8.txt fi.data
where http://gutenberg.net/dirs/1/0/4/9/10492/10492-8.txt is a text
representative of the Finnish language and "fi.data" is the name of the
data file for "fi" (ISO code for Finnish).
To install this filter, copy this directory under the Venus
filter directory and declare it in your filters list, for instance:
filters= categories.xslt guess-language/guess-language.py
NOTE: this filter depends on Amara
(http://uche.ogbuji.net/tech/4suite/amara/)
This diff is collapsed.
Click to expand it.
Prev
1
…
13
14
15
16
17
Next