Commit ee93ac9a authored by Sylvain Schmitz's avatar Sylvain Schmitz

return percentages and have a look at the extras

parent 5236f4fd
# XPath positive fragment with all extensions and extra features.
#
# Copyright (C) 2016-2017
# David Baelde, Anthony Lick and Sylvain Schmitz (ENS Cachan)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
default namespace = "http://www.w3.org/2005/XQueryX"
namespace xqx = "http://www.w3.org/2005/XQueryX"
include "xpath-1.0-efo-join.rnc"
include "expr/extra.rnc"
fun |= fun.extra
op |= op.extra
......@@ -9,13 +9,13 @@ names=(DocBook TEI HTMLBook eXist-db HisTEI xquerydoc MarkLogic XQJSON guid-o-ma
#names=(DocBook HTMLBook eXist-db HisTEI MarkLogic XQJSON)
echo "\\toprule"
echo "Source & queries & EFO & \\textsf{Core~1.0} & \\textsf{Core~2.0} & \\textsf{Downward} & \\textsf{Vertical} & \\textsf{Forward} & \\textsf{EMSO\$^\\textsf 2\$} & \\textsf{NonMixing}\\\\"
echo "Source & queries & EFO & EFO-Xtra & \\textsf{Core~1.0} & Core1-Xtra\\textsf{Core~2.0} & \\textsf{Downward} & \\textsf{Vertical} & \\textsf{Forward} & \\textsf{EMSO\$^\\textsf 2\$} & \\textsf{NonMixing}\\\\"
echo "\\midrule"
for ((i = 0; i < ${#xmlarray[@]}; ++i))
do
printf "${names[$i]} "
echo "`./numbers.sh $path/${xmlarray[$i]}$2.xml '<schemas>' 'xpath-1.0-efo-join.rnc.*yes' 'xpath-1.0-core-full.rnc.*yes' 'xpath-2.0-core-join.rnc.*yes' 'xpath-1.0-downward-last.rnc.*yes' 'xpath-1.0-vertical-full.rnc.*yes' 'xpath-1.0-forward-last.rnc.*yes' 'xpath-emso2-full.rnc.*yes' 'xpath-non-mixing-basic.rnc.*yes'`\\\\"
echo "`./numbers.sh $path/${xmlarray[$i]}$2.xml '<schemas>' 'xpath-1.0-efo-extra.rnc' 'xpath-1.0-efo-join.rnc.*yes' 'xpath-1.0-core-full.rnc.*yes' 'xpath-1.0-core-extra.rnc.*yes' 'xpath-2.0-core-join.rnc.*yes' 'xpath-1.0-downward-last.rnc.*yes' 'xpath-1.0-vertical-full.rnc.*yes' 'xpath-1.0-forward-last.rnc.*yes' 'xpath-emso2-full.rnc.*yes' 'xpath-non-mixing-basic.rnc.*yes'`\\\\"
done
echo "\\bottomrule"
......@@ -2,11 +2,17 @@
file=$1
shift
total=`grep "$1" $file | wc -l`
#printf "& $total "
shift
while test ${#} -gt 0
do
printf "& `grep \"$1\" $file | wc -l` "
count=`grep "$1" $file | wc -l`
percent=`bc <<< "100*$count/$total"`
printf "& $percent\\%% "
#printf "& $count "
shift
done
#echo "& `grep '<schemas>' $1 | wc -l` & `grep 'xpath-1.0.rnc' $1 | grep 'yes' | wc -l` & `grep 'xpath-2.0.rnc' $1 | grep 'yes' | wc -l` & `grep 'xpath-3.0.rnc' $1 | grep 'yes' | wc -l`\\\\"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment