AI-CBR

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

use strict;
use warnings;
use Module::Build;

my $builder = Module::Build->new(
    module_name         => 'AI::CBR',
    license             => 'perl',
    dist_author         => 'Darko Obradovic <dobradovic@gmx.de>',
    dist_version_from   => 'lib/AI/CBR.pm',
    build_requires => {
        'Test::More' => 0,
    },
    add_to_cleanup      => [ 'AI-CBR-*' ],
    create_makefile_pl => 'traditional',
);

$builder->create_build_script();

META.yml  view on Meta::CPAN

---
name: AI-CBR
version: 0.02
author:
  - 'Darko Obradovic <dobradovic@gmx.de>'
abstract: Framework for Case-Based Reasoning
license: perl
resources:
  license: http://dev.perl.org/licenses/
build_requires:
  Test::More: 0
provides:
  AI::CBR:
    file: lib/AI/CBR.pm
    version: 0.02
  AI::CBR::Case:
    file: lib/AI/CBR/Case.pm
  AI::CBR::Case::Compound:
    file: lib/AI/CBR/Case/Compound.pm
  AI::CBR::Retrieval:
    file: lib/AI/CBR/Retrieval.pm

Makefile.PL  view on Meta::CPAN

# Note: this file was auto-generated by Module::Build::Compat version 0.03
use ExtUtils::MakeMaker;
WriteMakefile
(
          'NAME' => 'AI::CBR',
          'VERSION_FROM' => 'lib/AI/CBR.pm',
          'PREREQ_PM' => {
                           'Test::More' => '0'
                         },
          'INSTALLDIRS' => 'site',
          'EXE_FILES' => [],
          'PL_FILES' => {}
        )
;

t/00-load.t  view on Meta::CPAN

#!perl -T

use Test::More tests => 4;

BEGIN {
	use_ok( 'AI::CBR::Sim' );
	use_ok( 'AI::CBR::Case' );
	use_ok( 'AI::CBR::Retrieval' );
	use_ok( 'AI::CBR::Case::Compound' );
}

diag( "Testing AI::CBR::Case $AI::CBR::Case::VERSION, Perl $], $^X" );

t/01-sim.t  view on Meta::CPAN

#!perl -T

use Test::More tests => 22;

use AI::CBR::Sim qw(sim_dist sim_frac sim_eq sim_set);


# sim_dist
is(sim_dist(26,22,10), 0.6, 'sim_dist works');
is(sim_dist(-1,-0.9,0.5), 0.8, 'sim_dist works');
is(sim_dist(0,4,8), 0.5, 'sim_dist works');

# sim_frac

t/02-case.t  view on Meta::CPAN

#!perl -T

use Test::More tests => 2;

use AI::CBR::Sim qw(sim_dist sim_frac sim_eq sim_set);
use AI::CBR::Case;


my $case1 = AI::CBR::Case->new(
	age      => { value => 30,             sim => \&sim_amount },
	gender   => { value => 'male',         sim => \&sim_eq     },
	job      => { value => 'programmer',   sim => \&sim_eq     },
	symptoms => { value => [qw(headache)], sim => \&sim_set,   weight =>2 },

t/03-retrieval.t  view on Meta::CPAN

#!perl -T

use Test::More tests => 7;

use AI::CBR::Sim qw(sim_frac sim_eq sim_set);
use AI::CBR::Case;
use AI::CBR::Retrieval;


my $case_base = [
	{id=>1, age=>25, gender=>'male',   job=>'manager',    symptoms=>[qw(headache)],       reason=>'stress' },
	{id=>2, age=>40, gender=>'male',   job=>'programmer', symptoms=>[qw(headache cough)], reason=>'flu'    },
	{id=>3, age=>30, gender=>'female', job=>'programmer', symptoms=>[qw(cough)],          reason=>'flu'    },

t/04-case-compound.t  view on Meta::CPAN

#!perl -T

use Test::More tests => 5;

use AI::CBR::Sim qw(sim_dist sim_frac sim_eq sim_set);
use AI::CBR::Case::Compound;
use AI::CBR::Retrieval;


my $case1 = AI::CBR::Case::Compound->new(
	# flight object
	{
		start  => { value => 'FRA', sim => \&sim_eq },

t/boilerplate.t  view on Meta::CPAN

#!perl -T

use strict;
use warnings;
use Test::More tests => 4;

sub not_in_file_ok {
    my ($filename, %regex) = @_;
    open( my $fh, '<', $filename )
        or die "couldn't open $filename for reading: $!";

    my %violated;

    while (my $line = <$fh>) {
        while (my ($desc, $regex) = each %regex) {

t/pod-coverage.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;

# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
    if $@;

# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
    if $@;

all_pod_coverage_ok();

t/pod.t  view on Meta::CPAN

#!perl -T

use strict;
use warnings;
use Test::More;

# Ensure a recent version of Test::Pod
my $min_tp = 1.22;
eval "use Test::Pod $min_tp";
plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;

all_pod_files_ok();

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.756 second using v1.00-cache-2.02-grep-82fe00e-cpan-585fae043c8 )