<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Formal Concept Analysis Research Toolbox and Failure Deterministic Finite Automata</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alexey Neznanov</string-name>
          <email>ANeznanov@hse.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Derrick G. Kourie</string-name>
          <email>dkourie@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Research University “Higher School of Economics”, Moscow, Russia University of Pretoria</institution>
          ,
          <addr-line>Pretoria</addr-line>
          ,
          <country country="ZA">South Africa</country>
        </aff>
      </contrib-group>
      <fpage>40</fpage>
      <lpage>46</lpage>
      <abstract>
        <p>Formal Concept Analysis Research Toolbox (FCART) is an integrated environment for knowledge and data engineers with a set of research tools based on Formal Concept Analysis (FCA). In the paper we consider main FCA workflow and some applications in the field of the text pattern matching.</p>
      </abstract>
      <kwd-group>
        <kwd>Pattern Matching</kwd>
        <kwd>Formal Concept Analysis</kwd>
        <kwd>Finite Automata</kwd>
        <kwd>Software</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Formal Concept Analysis (FCA) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is a mature group of mathematical models and
good foundation for the methods of intelligent system construction. At present FCA
has many applications in various data analysis and knowledge processing tasks
[
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2,3,4</xref>
        ].
      </p>
      <p>
        In previous articles [
        <xref ref-type="bibr" rid="ref5 ref6">5,6</xref>
        ] we described the stages of development of a software
system for information retrieval and knowledge discovery from various data sources
based on FCA approach. Formal Concept Analysis Research Toolbox (FCART) was
designed especially for the analysis of the complex data including unstructured text
collections.
      </p>
      <p>In this paper we will focus on basic FCA tasks and some interesting applications in
the field of the text pattern matching.</p>
    </sec>
    <sec id="sec-2">
      <title>FCART methodology and technology</title>
      <p>
        The underlying methodology of the FCART allows one to obtain new knowledge
from data in an iterative ontology-driven process. The software is based on modern
methods and algorithms of data analysis, technologies for processing big data
collections, data visualization, reporting, and interactive processing techniques. The
FCART evolves in the direction of a distributed system based on REST web-services
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. It implements several basic principles:
1. The iterative process of data analysis using ontology-driven queries and interactive
artifacts (such as concept lattices, clusters, implications, etc.).
2. The separation of the processes of data querying (from various data sources), data
preprocessing (of locally saved immutable snapshots), data analysis (in interactive
visualizers of immutable analytic artifacts), and results presentation (in a report
builder).
3. The extendibility on three levels: customizing settings of data access components,
query builders, solvers and visualizers; writing scripts (macros); developing
components (add-ins).
4. The explicit definition of analytic artifacts and their types. It allows one to check
the integrity of analytical session data and provides links between artifacts for an
end-user.
5. The implementation of the integrated performance estimation tools.
6. The integrated documentation of software tools and methods of data analysis.
      </p>
      <p>The current local version of FCART consists of the following components.
─ Core component includes:
• the multiple-document user interface of research environment with session
manager and extensions manager,
• snapshot profiles editor (SHPE),
• snapshot query editor (SHQE),
• query rules database (RDB),
• session database (SDB),
• core of report builder.
─ Intermediate Data Storage (IDS) for preprocessed data collections in JSON format.
─ Internal solvers and visualizers.
─ Additional plugins, scripts and report templates.</p>
      <p>We use Microsoft and Embarcadero programming environments and different
programming languages (C++, C#, Delphi, Python and other). The native executable (the
core of the system) is compatible with Microsoft Windows 2000 and later and has not
any additional dependences. The important feature of FCART is scripting. Thus,
generating and transforming artifacts, drawing, and building reports can be done by
scripts. For scripting we use Delphi Web Script and Python languages.</p>
      <p>From an analyst point of view, the basic FCA workflow in FCART has four stages
(see Fig. 1). On each stage, a user has the ability to import/export every artifact or add
it to a report.
1. The filling Intermediate Data Storage (IDS) of FCART from various external SQL,
XML or JSON-like data sources (querying external source described by an
External Data Query Description – EDQD). EDQD can be produced by some External
Data Browser.
2. The loading a data snapshot from the IDS into an analytic session (a snapshot is
described by a Snapshot Profile). A data snapshot is a data table with annotated
structured and text attributes loaded in the system by accessing IDS.
3. The transforming a snapshot to a binary context (a transformation is described by a</p>
      <p>Scaling Query).
4. The building and visualizing formal concept lattice and the other artifacts based on
the binary context in a scope of analytic session.</p>
      <p>External Data Source</p>
      <p>External Data Set</p>
      <p>External Data
Query Description
Snapshot Profile &amp;
Graph Generators
Snaphot Scaling</p>
      <p>Query</p>
      <p>IDS Web-service</p>
      <p>Http Request Parser</p>
      <p>IDS Import/Export Tools
Communication Subsystem</p>
      <p>Indexing Subsystem</p>
      <p>MongoDB
Analytic Artifacts</p>
      <p>Pattern Structure</p>
      <p>Clusters
SOMs</p>
      <p>JSON Collection
Binary Context</p>
      <p>Concept Lattice</p>
      <p>FCART
Import/Export</p>
      <p>Tools</p>
      <p>Session DB</p>
      <p>Data Snapshot
(Multivalued Context)</p>
    </sec>
    <sec id="sec-3">
      <title>Working with analytical session</title>
      <sec id="sec-3-1">
        <title>Analytical session structure</title>
        <p>Some of FCA entities appear to be fundamental to the information representation. In
the methodology, we use the term “analytic artifact” to denote the definition of an
abstract interface, describing the entity of the analytic process. The basic artifact for
FCA-based methods is that of the “formal context”, i.e., object-attribute
representation of a subject domain. The most important artifacts also include the “concept
lattice” and the “formal concept”.</p>
        <p>Artifacts’ instances can be linked by “origination” relationship. For example, we
can generate a concept lattice from the given formal context. In this case, the formal
concept will be an "origin artifact" or simply “origin” for the lattice. Another example
is the pair of a lattice and an “association rules set”: the lattice is the origin of the
rules set. Any artifact’s instance is immutable. It means that any instance cannot be
changed after creation, but can be copied and visualized in various ways.</p>
        <p>If we have the predefined set of artifacts, in the most cases we can use the term
“artifact” instead of “artifacts’ instance” without ambiguity. The collection of all artifacts
in current analytic cycle forms so-called “analytical session”.</p>
        <p>An “Initial artifact” is an artifact without origin in a current session. For example,
after loading a formal context from a file on a disk we obtain an initial artifact. Such
an artifact becomes one of the roots in a current session.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Solvers, visualizers, and reports</title>
        <p>An analyst works with analytic artifacts using solvers, visualizers and reports.</p>
        <p>Solvers. All types of artifacts are generated by solvers. Each solver requires one or
many artifacts’ instances of preassigned types as an input and produces one artifact’s
instance of preassigned type as an output. The parameters profile of a solver allows to
save/load parameters and automatically create dialogs for a user input. Each
parameter has Id, title, data type, hint, group and default value.</p>
        <p>Having the predefined types of artifacts and links (assigned by solvers) between
immutable artifacts’ instances we can check the integrity of data of particular
analytical session. Without explicit user action a session cannot lose any artifact instances
and links, and guarantees the integrity of a session.</p>
        <p>A solver without input artifacts is called “Generator”. Generator can use a script
or a plugin for automatic building artifact from scratch.</p>
        <p>Visualizers. Artifact visualizer is a special solver that generates the user-oriented
visual representation of input artifact (or several artifacts) instance. From a technical
point of view, visualizer produces an interactive or non-interactive window with some
elements of user interface. Of course, one artifact can have different kinds of visual
appearance.</p>
        <p>Each artifact type has default visualizer, which is invoked by clicking on an artifact
in the session window. The parameters profile of visualizer defines common visual
properties and drawing parameters (for example, coordinates of concepts in a concept
lattice). In interactive visualizer, a user has the set of tools for changing the drawing
parameters “on the fly”. Usually, visualizer is the last in a chain of solvers. However,
we can get a visual representation of each artifact in the current session. For example,
formal concept lattice visualizer (lattice browser) draws a diagram of the lattice and
allows a user to manipulate the diagram, but this browser itself does not generate new
artifacts. We need to distinguish the generation of new artifact and drawing of an
existing artifact for various cases: working in the batch mode, increasing efficiency of
long chains of solvers, benchmarking, etc. Of course, a complex visualizer can help
invoking next solvers by simplifying select of some input artifacts as parts of the
visualized artifact.</p>
        <p>Reports. Report is a final representation of the research results. Every scientific
environment should provide a rich text editor of a report with additional functionality
to avoid mistakes while converting and moving multiple artifacts with metadata into
an external editor. The main feature of the FCART report builder is the automatic
insertion of the fully decorated artifact representation in the resulting report. An
artifact can support several representations in form of a text as of a vector or a bitmap
image as well.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Interactive editing of artifacts</title>
        <p>What is sources of the artifacts? An initial artifact can be generated by:
1. The executing a script or a plugin (with type “Generator of …”) without an input
artifact.
2. The loading an artifact from a session or an external file
3. The querying to the IDS or some External Data Source.
4. The opening one of the interactive editor.</p>
        <p>The result of a generator or a query becomes immutable. It is also obvious that
artifact is mutable while editing by an interactive editor. A user can send a copy of an
artifact to an interactive editor, if FCART has the registered editor for such an
artifact’s type. Fig. 4 shows the user interface of the standard formal context editor. After
execution of the “Build lattice…” command the immutable formal context is added to
the session and becomes the origin of the formal concept lattice.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>FCART and Failure Deterministic Finite Automata</title>
      <p>
        The Formal Concept Analysis approach is used for transform a Deterministic Finite
Automata (DFA) into a Failure Deterministic Finite Automata (FDFA). FDFA is
proposed and defined by Kourie D.G., Watson B.W. and others in 2012 [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        Madoda N., Kourie’s master student, had used the local version of FCART in
2014 for efficient generation of the state/out-transition concepts and interactive
analysis of the state/out-transition (formal concept) lattice [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. FCART had been integrated
in the DFA – Homomorphic Algorithm (DHA) workflow without any specific
input/output formats or plugins. There are three stages of FCART usage in DHA:
1. Loading state/out-transition context for the given DFA from a CSV file.
2. Building formal concept lattice for a given DFA.
3. Saving PAR concepts into an XML file.
      </p>
      <p>Optionally a user can check the context and analyse the lattice that also saved in
XML format.</p>
      <p>
        The next step should be the development of a new web-solver for distributed
version of FCART [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. It will rise the efficiency of DHA implementation and will allow
using DHA as a REST web-service.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and future work</title>
      <p>In this paper we have described the FCART software and its application in research of
failure deterministic finite automata. The demo-version of used local version 0.9.4 of
the FCART can be downloaded from http://cs.hse.ru/en/ai/issa/proj_fcart.</p>
      <p>We will try to advance some functionality in the distributed version of FCART.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>This work was carried out by the authors within the project “Data mining based on
applied ontologies and lattices of closed descriptions” supported by the Basic
Research Program of the National Research University Higher School of Economics.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ganter</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wille</surname>
            <given-names>R</given-names>
          </string-name>
          . Formal
          <source>Concept Analysis: Mathematical Foundations</source>
          , Springer,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Priss</surname>
            <given-names>U</given-names>
          </string-name>
          .
          <source>Formal Concept Analysis in Information Science, Annual Review of Information Science and Technology</source>
          ,
          <volume>40</volume>
          ,
          <year>2006</year>
          , pp.
          <fpage>521</fpage>
          -
          <lpage>543</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Poelmans</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsov</surname>
            <given-names>S.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ignatov</surname>
            <given-names>D.I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dedene</surname>
            <given-names>G</given-names>
          </string-name>
          .
          <article-title>Formal Concept Analysis in knowledge processing: A survey on models and techniques</article-title>
          ,
          <source>Expert Systems with Applications</source>
          ,
          <volume>40</volume>
          (
          <issue>16</issue>
          ),
          <year>2013</year>
          , pp.
          <fpage>6601</fpage>
          -
          <lpage>6623</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Poelmans</surname>
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ignatov</surname>
            <given-names>D. I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsov</surname>
            <given-names>S.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dedene</surname>
            <given-names>G</given-names>
          </string-name>
          .
          <article-title>Formal concept analysis in knowledge processing: A survey on applications</article-title>
          ,
          <source>Expert Systems with Applications</source>
          ,
          <volume>40</volume>
          (
          <issue>16</issue>
          ),
          <year>2013</year>
          , pp.
          <fpage>6538</fpage>
          -
          <lpage>6560</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Neznanov</surname>
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ilvovsky</surname>
            <given-names>D.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsov</surname>
            <given-names>S.O.</given-names>
          </string-name>
          <article-title>FCART: A New FCA-based System for Data Analysis and Knowledge Discovery, Contributions to the 11th</article-title>
          <source>International Conference on Formal Concept Analysis</source>
          ,
          <year>2013</year>
          , pp.
          <fpage>31</fpage>
          -
          <lpage>44</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Neznanov</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parinov</surname>
            <given-names>A</given-names>
          </string-name>
          .
          <source>FCA Analyst Session and Data Access Tools in FCART, 16th International Conference “Artificial Intelligence: Methodology</source>
          ,
          <string-name>
            <surname>Systems</surname>
          </string-name>
          , and Applications” (AIMSA-
          <year>2014</year>
          ),
          <year>2014</year>
          , pp.
          <fpage>214</fpage>
          -
          <lpage>221</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Neznanov</surname>
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parinov</surname>
            <given-names>A.A.</given-names>
          </string-name>
          <string-name>
            <surname>Distributed</surname>
          </string-name>
          <article-title>Architecture of Data Analysis System based on Formal Concept Analysis Approach</article-title>
          ,
          <string-name>
            <surname>Intelligent Distributed Computing</surname>
            <given-names>IX</given-names>
          </string-name>
          ,
          <year>2015</year>
          , pp.
          <fpage>265</fpage>
          -
          <lpage>271</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kourie</surname>
            <given-names>D.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Watson</surname>
            <given-names>B.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cleophas</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Venter</surname>
            <given-names>F.</given-names>
          </string-name>
          ,
          <source>Failure Deterministic Finite Automata, Proceedings of the Prague Stringology Conference 2012б</source>
          ,
          <year>2012</year>
          , pp.
          <fpage>28</fpage>
          -
          <lpage>41</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Madoda</surname>
            <given-names>A.N.</given-names>
          </string-name>
          <article-title>An Assessment of Selected Algorithms for Generating Failure Deterministic Finite Automata</article-title>
          .
          <source>Master's dissertation</source>
          , University of Pretoria, Department of Computer Science, Pretoria, South Africa,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>