The cl-arff-parser Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-arff-parser Reference Manual

This is the cl-arff-parser Reference Manual, version 0.8, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 13:24:11 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cl-arff-parser

A simple and easy to use arff (Attribute-Relation File Format) parser for common lisp.

For more information on arff take a look at: http://www.cs.waikato.ac.nz/ml/weka/arff.html

It is compatible with all major lisps (SBCL, CCL, Lispworks, ...)


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-arff-parser

Author

Pieter Wellens

License

see LICENSE.txt

Description

A parser for Weka arff (Attribute-Relation File Format) Machine learning datasets.

Version

0.8

Source

cl-arff-parser.asd (file)

Component

cl-arff-parser.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-arff-parser.asd

Location

cl-arff-parser.asd

Systems

cl-arff-parser (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-arff-parser/cl-arff-parser.lisp

Parent

cl-arff-parser (system)

Location

cl-arff-parser.lisp

Packages

cl-arff-parser

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-arff-parser

A parser and some manipulation for Weka Machine (ARFF) Learning datasets.

Source

cl-arff-parser.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: parse-arff ARFF-PATH

The arff-path should be a string pointing to an arff-file.

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: arff-attributes OBJECT
Generic Function: (setf arff-attributes) NEW-VALUE OBJECT
Package

cl-arff-parser

Methods
Method: arff-attributes (ARFF arff)
Method: (setf arff-attributes) NEW-VALUE (ARFF arff)

The attributes as specified in the
header. Each attribute is a list that looks as follows: ("attribute-name" ("type")). In case of a nominal attribute it looks like
this: ("attribute-name" ("nominal" . values)).

Source

cl-arff-parser.lisp (file)

Generic Function: arff-data OBJECT
Generic Function: (setf arff-data) NEW-VALUE OBJECT
Package

cl-arff-parser

Methods
Method: arff-data (ARFF arff)
Method: (setf arff-data) NEW-VALUE (ARFF arff)

All the data. The bulk of the file.

Source

cl-arff-parser.lisp (file)

Generic Function: arff-path OBJECT
Generic Function: (setf arff-path) NEW-VALUE OBJECT
Package

cl-arff-parser

Methods
Method: arff-path (ARFF arff)
Method: (setf arff-path) NEW-VALUE (ARFF arff)

A string to the path of the arff
file. e.g. /home/user/myData/foo.arff

Source

cl-arff-parser.lisp (file)

Generic Function: arff-relation OBJECT
Generic Function: (setf arff-relation) NEW-VALUE OBJECT
Package

cl-arff-parser

Methods
Method: arff-relation (ARFF arff)
Method: (setf arff-relation) NEW-VALUE (ARFF arff)

The string after @relation. This is essentially the name of the arff.

Source

cl-arff-parser.lisp (file)

Generic Function: remove-attribute-by-name ARFF NAME

Removes the feature with the given name from the
arff object (not from the actual file). It will remove it both from that @attributes and the @data.

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Methods
Method: remove-attribute-by-name (ARFF arff) NAME
Method: remove-attribute-by-name (ARFF arff) (NAME string)

Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Classes

Class: arff ()

An arff object contains all the data found in a parsed arff file.

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: arff-path

A string to the path of the arff
file. e.g. /home/user/myData/foo.arff

Initargs

:arff-path

Initform

"~/"

Readers

arff-path (generic function)

Writers

(setf arff-path) (generic function)

Slot: arff-relation

The string after @relation. This is essentially the name of the arff.

Initargs

:arff-reltation

Initform

""

Readers

arff-relation (generic function)

Writers

(setf arff-relation) (generic function)

Slot: arff-attributes

The attributes as specified in the
header. Each attribute is a list that looks as follows: ("attribute-name" ("type")). In case of a nominal attribute it looks like
this: ("attribute-name" ("nominal" . values)).

Type

list

Initargs

:arff-attributes

Readers

arff-attributes (generic function)

Writers

(setf arff-attributes) (generic function)

Slot: arff-data

All the data. The bulk of the file.

Type

list

Initargs

:arff-data

Readers

arff-data (generic function)

Writers

(setf arff-data) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: csv->list STRING &optional SEPARATOR

Given a string like ’1,2,3, 6, foo’ will return list (’1’ ’2’ ’3’ ’6’ ’foo’)

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: parse-@attribute LINE

@attribute <attribute-name> <datatype>. Returns a list containing the attribute-name and then a list containing datatype information as parsed by parse-datatype.

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: parse-attribute-name LINE

Assumes the beginning of this line is the attribute-name. If spaces are to be included in the name then the entire name must be quoted. As second return value it also returns the rest of the line which should be the datatype.

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: parse-data LINE
Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: parse-datatype LINE

Assumes that the line starts with the datatype.Look at http://www.cs.waikato.ac.nz/~ml/weka/arff.html for information about the datatype. There is no support for the date datatype.

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: search-space-or-tab LINE
Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: string-replace STR1 SUB1 SUB2

Nondestructively replaces all occurences of sub1 in str1 by sub2

Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)

Function: trim-comments-and-spaces STRING &optional COMMENT-MARKER
Package

cl-arff-parser

Source

cl-arff-parser.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-arff-parser.asd: The cl-arff-parser<dot>asd file
cl-arff-parser/cl-arff-parser.lisp: The cl-arff-parser/cl-arff-parser<dot>lisp file

F
File, Lisp, cl-arff-parser.asd: The cl-arff-parser<dot>asd file
File, Lisp, cl-arff-parser/cl-arff-parser.lisp: The cl-arff-parser/cl-arff-parser<dot>lisp file

L
Lisp File, cl-arff-parser.asd: The cl-arff-parser<dot>asd file
Lisp File, cl-arff-parser/cl-arff-parser.lisp: The cl-arff-parser/cl-arff-parser<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   F   G   M   P   R   S   T  
Index Entry  Section

(
(setf arff-attributes): Exported generic functions
(setf arff-attributes): Exported generic functions
(setf arff-data): Exported generic functions
(setf arff-data): Exported generic functions
(setf arff-path): Exported generic functions
(setf arff-path): Exported generic functions
(setf arff-relation): Exported generic functions
(setf arff-relation): Exported generic functions

A
arff-attributes: Exported generic functions
arff-attributes: Exported generic functions
arff-data: Exported generic functions
arff-data: Exported generic functions
arff-path: Exported generic functions
arff-path: Exported generic functions
arff-relation: Exported generic functions
arff-relation: Exported generic functions

C
csv->list: Internal functions

F
Function, csv->list: Internal functions
Function, parse-@attribute: Internal functions
Function, parse-arff: Exported functions
Function, parse-attribute-name: Internal functions
Function, parse-data: Internal functions
Function, parse-datatype: Internal functions
Function, search-space-or-tab: Internal functions
Function, string-replace: Internal functions
Function, trim-comments-and-spaces: Internal functions

G
Generic Function, (setf arff-attributes): Exported generic functions
Generic Function, (setf arff-data): Exported generic functions
Generic Function, (setf arff-path): Exported generic functions
Generic Function, (setf arff-relation): Exported generic functions
Generic Function, arff-attributes: Exported generic functions
Generic Function, arff-data: Exported generic functions
Generic Function, arff-path: Exported generic functions
Generic Function, arff-relation: Exported generic functions
Generic Function, remove-attribute-by-name: Exported generic functions

M
Method, (setf arff-attributes): Exported generic functions
Method, (setf arff-data): Exported generic functions
Method, (setf arff-path): Exported generic functions
Method, (setf arff-relation): Exported generic functions
Method, arff-attributes: Exported generic functions
Method, arff-data: Exported generic functions
Method, arff-path: Exported generic functions
Method, arff-relation: Exported generic functions
Method, remove-attribute-by-name: Exported generic functions
Method, remove-attribute-by-name: Exported generic functions

P
parse-@attribute: Internal functions
parse-arff: Exported functions
parse-attribute-name: Internal functions
parse-data: Internal functions
parse-datatype: Internal functions

R
remove-attribute-by-name: Exported generic functions
remove-attribute-by-name: Exported generic functions
remove-attribute-by-name: Exported generic functions

S
search-space-or-tab: Internal functions
string-replace: Internal functions

T
trim-comments-and-spaces: Internal functions

Jump to:   (  
A   C   F   G   M   P   R   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   A   S  
Index Entry  Section

A
arff-attributes: Exported classes
arff-data: Exported classes
arff-path: Exported classes
arff-relation: Exported classes

S
Slot, arff-attributes: Exported classes
Slot, arff-data: Exported classes
Slot, arff-path: Exported classes
Slot, arff-relation: Exported classes

Jump to:   A   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   P   S  
Index Entry  Section

A
arff: Exported classes

C
cl-arff-parser: The cl-arff-parser system
cl-arff-parser: The cl-arff-parser package
Class, arff: Exported classes

P
Package, cl-arff-parser: The cl-arff-parser package

S
System, cl-arff-parser: The cl-arff-parser system

Jump to:   A   C   P   S