Home Features Demos Download Installation User Manual Developer Manual Relation function Credits

Login

Expression functions

Mathematical functions


abs(x)
ceil(x)
cos(x)
exp(x)
floor(x)
ln(x)
log(x)
max(x,y,...)
min(x,y,...)
pow(x,y)
rnd() a random between 0 and 1
round(x)
sign(x)
sin(x)
sqrt(x)
tan(x)

Statistical functions


bigramstat(a) returns statistics of bigrams of a text as bigram=count list
cosinesimilarity(v,w) calculates the similiarity of two vectors (value=count lists)
jaccarddistance(v,w) calculates the jaccard distance of two vectors (value=count lists)
levenshtein(a,b)
secondstosql(n) seconds since 1970
sqlescape(s) handles single quotes in SQL statement strings
sqltoseconds(s)
weightedjaccarddistance(v,w) calculates the weighted jaccard distance of two vectors (value=count lists)

System functions


fileexists(f) checks for files in the site/files/ and the site/cache/ directories (files that can be accessed with the read instruction)

Text functions


format(x,format)
hint(needle,haystack)
length(s)
lower(s)
pad(s,n) fills up to length n with spaces
regexreplace(s,pattern,replacement)
regexreplacemod(s,pattern,replacement,modifiers)
replace(s,oldtext,newtext) is case sensitive
resume(s,length,raw) shows the start of a text with length defined, and removes tags if raw is set)
strip(s) removes html and wikitext tags
substr(s,start, length) start is optional and zero-based, length is zero-based
textrank(s,length) Extracts the most signifikant sentences of a text based on the textrank algorithm
trim(s)
upper(s)
urltext(s)

Sofawiki functions


anyfunction(arg1,arg2...) All predifined or user sofawiki functions can be used.
template(name,arg1,arg2..) A wrapper for templates
link(urlname,label) A wrapper for internal links
tag(tag), tag(tag, content), tag(tag, parameter, content) A wrapper for tags.