Explaining the sign data format of FSW

Stephen E Slevinski Jr slevin at SIGNPUDDLE.NET
Wed Feb 5 14:45:19 UTC 2014

On 2/5/14, 5:15 AM, Honza wrote:
> I still wander how exactly can be FSW used for searching and ordering 
> signs.
> Please can you show me?

Hi Honza,

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.

Further reading:
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".

FSW:  AS10000M508x515S10000493x485
QSW: QS10000493x485

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.
QSW: QS10000493x485V10

If we remove the coordinate, we will have a general search for any sign 
that uses the symbol regardless of position.
QSW: QS10000

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.
QSW: QS100uu

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.

Further reading:
Query Language

Hope that helps,



Valerie Sutton
SignWriting List moderator
sutton at signwriting.org

Post Messages to the SignWriting List:
sw-l at listserv.valenciacollege.edu

SignWriting List Archives & Home Page

Join, Leave or Change How You Receive SW List Messages

More information about the Sw-l mailing list