On 2/5/14, 5:15 AM, Honza wrote:
> I still wander how exactly can be FSW used for searching and ordering
> Please can you show me?
Sorting is done using any basic string comparison. All applications,
tools, and programming languages will sort the FSW strings automatically
to the order of the ISWA 2010.
Not all signs can be sorted because an optional prefix is required. The
prefix is a temporal spelling of the symbols used in 2-dimensional space.
Terms for Sorting
Searching is based on regular expressions and more complicated. Formal
SignWriting (FSW) is closely related to the query language (QSW). Any
FSW string can be converted to a query string by replacing the optional
prefix, lane marker, and preprocessed max coordinate with the letter "Q".
The coordinates in the query string indicate spatial searching for the
particular symbol in 2-dimensional space. Spatial searching defaults to
a variance of 10. The variance can be added at the end of a query string.
If we remove the coordinate, we will have a general search for any sign
that uses the symbol regardless of position.
The last 2 digits of the symbol key indicate fill and rotation. We can
widen our searching by replacing those 2 digits with "u" for unknown.
The query language can not be used directly, but must be converted into
one or more regular expressions by a processor. Two functions are
required to perform this transformation: range2regex and query2regex.
Both of these functions are implemented in the SignWriting Icon Server
in the "fsw.php" file.
The regular expressions are many times longer than the query string
itself. Over 1 million tests were used to verify the accuracy of the
auto-generated regular expressions.
The regular expressions, once generated, and be used in any application,
tool, or programming language that supports regular expressions.
Hope that helps,
SIGNWRITING LIST INFORMATION
SignWriting List moderator
[log in to unmask]
Post Messages to the SignWriting List:
[log in to unmask]
SignWriting List Archives & Home Page
Join, Leave or Change How You Receive SW List Messages