CAPRI: Type-Casted Pattern and Rule Miner
-----------------------------------------
Version	1.0
Date:	Feb. 2013
Author: Farhana Zulkernine

Usage:	java Capri <inputfile> [outputfile]

Description: 

The Capri tool is used to mine structural line patterns in a type-casted format from single and multi-line semi-structured log data files. By default it generates a text output file "LTVPatterns.txt" where it lists the line patterns, frequent term and value patterns and the association rules which show the contextual relationships between pairs of line patterns. The tool prompts for input and output files, frequent line, term and value support thresholds, and support and confidence thresholds for the rules. Only input file name is mandatory and the others are optional. If output file name is provided, the tool generates a similar copy of the input file with the exception that each line is labeled with a line number and a pattern id to facilitate the next phase of data processing. For large input files, output file name can be omitted to avoid regenerating the whole data.

The tool extracts frequent, rare and interesting (containing 3 or more consecutive symbols in a word) line patterns. For mining frequent line, term and value patterns, it requests minimum support threshold for each of these and uses a default value if the user does not enter a value. Typically a rule is generated for every possible pair of line patterns that appear in the data file. To minimize the rule set, user can enter a minimum support and confidence threshold for the rules. A default value is set if the user does not enter a value.

Installation:

Java class files are provided in a downloadable zip file. Copy the class files in a directory. Install the Java run-time library of version 1.6 and make sure that it is on the system path. At command prompt, type "java Capri <inputfile> [outputfile]" to execute the tool.


Example:

	Line pattern id : Pattern : Support count
	p1 : i1 c1 * : 1
	p2 : i2.i2.i2 c3i5 * : 4
	p3 : i2.i2.i2 c3i5 ---- * : 1

	Term patterns : Term position in the line : Support count : [Value pattern : support count, ...]
	i2.i2.i2	: pos 1	:	4	[1?.??.?? : 3, ??.??.?? : 4]
	i3		: pos 1	:	7	[771 : 4, 744 : 3, 7?? : 7]
	c3i5		: pos 2	:	4	[STC10799 : 3, STC????? : 4]

	Rule list (having support > 0.1 and confidence > 0.5):

	p2-p4 (cnt:2, sup:0.18181818181818182) => {TL=T0=0.5}
	p4-p4 (cnt:3, sup:0.2727272727272727) => {T0=T0=0.6666666666666666}


Implementation:

The Capri tool was developed using java 1.6.0_26 on a 64-bit Windows platform. 

