Library for Formal Concept Analysis

Build Status Maven Central




FCAlib is an open-source, extensible library for Formal Concept Analysis (FCA) tool developers. It provides basic functionalities that are needed for building an FCA tool. It supports incomplete contexts and includes efficient implementations of basic FCA algorithms like implicational closure, next-closed set, etc. It implements the attribute exploration algorithm in such a way that it can be used together with a custom implemented expert.

FCAlib is extended by OntoComPlib for using attribute exploration together with OWL ontologies. The following code segment shows how to create a formal context, add attributes to it, create an expert for this context, and start attribute exploration:

  // Create a formal context whose attributes are of type String, and whose objects have
  // identifiers of type String
  FormalContext<String,String> context = new FormalContext<String,String>();
  // Create an expert for this context
  MyExpertClass<String> expert = new MyExpertClass<String>(context);
  // Add attributes to this context
  // Set expert for this context
  // Context listens to the actions of the expert
  // Create an expert action for starting attribute exploration           
  StartExplorationAction<String,String,FullObject<String,String>> action = 
          new StartExplorationAction<String,String,FullObject<String,String>>();
  // Fire the action, exploration starts...

The following code segment shows how to create a set of implications for the above context, add implications to it, and compute next-closure:

  // Create a set of implications for the above context. Attributes are of type String
  ImplicationSet<String> = new ImplicationSet<String>(context);
  // Create a new implication with empty premise and conclusion
  Implication<String> imp = new Implication<String>();
  // Add attribute "a" to the premise
  // Add attribute "b" to the conclusion
  // Add this implication to the implication set
  // Compute the next-closed set after mySet, and update mySet
  mySet = implications.nextClosure(mySet);

Source code

To checkout and compile the project, use:

$ git clone https://github.com/julianmendez/fcalib.git
$ cd fcalib
$ mvn clean install

To compile the project offline, first download the dependencies:

$ mvn dependency:go-offline

and once offline, use:

$ mvn --offline clean install

The bundles uploaded to Sonatype are created with:

$ mvn clean install -DperformRelease=true

and then:

$ cd target
$ jar -cf bundle.jar fcalib-*

The version number is updated with:

$ mvn versions:set -DnewVersion=NEW_VERSION

where NEW_VERSION is the new version.


GNU General Public License version 3.0


Original Developer: Barış Sertkaya

Additional Developers: Julian Mendez, Francesco Kriegel, Daniel Borchmann