view release on metacpan or search on metacpan
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2014 by hagen geissler santex@cpan.org.
This is free software, licensed under:
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
4. You may distribute the programs of this Package in object code or executable
form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where to
get the Standard Version.
b) accompany the distribution with the machine-readable source of the Package
with your modifications.
c) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting the differences in manual pages (or
equivalent), together with instructions on where to get the Standard
Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You
may not charge a fee for this Package itself. However, you may distribute this
---
abstract: 'AI::MicroStructure Creates Concepts for words'
author:
- 'santex <santex@cpan.org>'
build_requires: {}
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.041, CPAN::Meta::Converter version 2.142690'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: AI-MicroStructure
no_index:
directory:
- misc
requires:
AI::Categorizer: '0'
AI::Categorizer::Document: '0'
AI::Categorizer::KnowledgeSet: '0'
AI::Categorizer::Learner::NaiveBayes: '0'
Algorithm::BaumWelch: '0'
AnyDBM_File: '0'
AnyEvent::Subprocess::Easy: '0'
Cache::Memcached::Fast: '0'
Carp: '0'
Class::Container: '0'
Statistics::Basic: '0'
Statistics::Contingency: '0'
Statistics::Descriptive: '0'
Statistics::Distributions::Ancova: '0'
Statistics::MVA::BayesianDiscrimination: '0'
Statistics::MVA::HotellingTwoSample: '0'
Storable: '0'
Storable::CouchDB: '0'
Sysadm::Install: '0'
perl: v5.14.1
resources:
homepage: http://active-memory.de:2323
version: '0.20'
AI-MicroStructure
=================
A concept is a mental representation for a word or any form of inputs!
Concepts allows us to draw appropriate inferences about the type of entities we encounter in our everyday lives!
The use of concepts is necessary to cognitive processes such as categorization, memory, decision making, learning and inference.
AI-MicroStructure is a package to build concepts for words.
Anybody whisching to do categorization, memory, decision making, learning and inference.
requires as much concepts for a specific (word,idea,sensor input) as possible to base any further knowledge or decission on
to be able to fly you require only to types
```
micro new extraterrestrial_life
.--'"""""--.>_
.-' o\\b.\o._o.`-.
.-'.- ) \d888888888888b.
/.' b Y8888888888888888b.
.-'. 8888888888888888888888888b
/ o888 Y Y8888888888888888888888b
/ d888P/ /| Y"Y8888888888888888888b
J d8888/| Y .o._. "Y8888888888888Y" \
Fdd 8888888888888888888bo._'|| d88888|
Fd d 88\ Y8888Y "Y888888888b, d888888P
d-b 8888b Y88P' """""Y888b8888P"|
J 8\88888888P `m. """"" |
|| `8888888P' "Ymm._ _J
|\\ Y8888P ' .mmm.YM) .mMF"'
| \\ Y888J ' < (@)>.- ` /MFm. |
J \ `YY ""' :: MM @)>F
L /) 88 : | ""\|
| ( ( Yb . ' . | L
\ bo 8b . . J | The word extraterrestrial
\ "' . . . . L F has 1 concept's
o._.:. . . \mm,__J/ / we need to find out the which one
Y8::'|. / `Y8P J to use for our new,
`|' J: . . ' . . | F micro-structure,
| L ' . _: |
| `: . .:oood8bdb. | (1): a form of life assumed to exist outside the earth or its atmosphere extraterrestrial
F `:. "-._ `" F
/ `::. """' /
/ `::. "" /
_.-d( `:::. F
-888b. `::::. . J
Y888888b. `::::::::::'
Y88888888bo. `::::::d
`"Y8888888888boo.._ `"dd88b.
"""""""""""""""""""""""""""""""""""""""""""""""
Type: the number you choose 1..1
1
extraterrestrialbeing
extraterrestrial
alien
hypothetical_creature
imaginary_being
imaginary_creature
imagination
imaginativeness
vision
creativity
creativeness
creative_thinking
ability
power
cognition
knowledge
noesis
psychological_feature
abstraction
abstract_entity
entity
extraterrestrialbeing
extraterrestrial
alien
hypothetical_creature
```
â [sample](http://quantup.com)
```
#try something like this
$ micro new ufo; # creates a structure called ufo
$ micro drop ufo; # deletes the structure called ufo
$ micro structures; # shows all structure's you currently have
#after creation of a structure you can access it in lots of ways
$ micro; # one word of a random structure
$ micro ufo; # one word of the ufo structure
$ micro ufo all; # all words of the ufo structure
$ micro any 10; # 10 random words of any structure you have created
$ micro --init # initializes active memory
$ micro --export # export relations from couchdb into git repo and tag data
# oneliners i like to use
$ for i in `micro structures`; do echo $i; done; # echos all the structures
$ for i in `micro ufo all`; do echo $i; done; # echos all words in ufo
$ for i in `micro structures`; do micro all $i; done; # echos all stuctures all words
$ for i in `micro ufo all`; do micro new $i; done; # new structure for all words in ufo
$ for i in `micro ufo all`; do micro-wiki $i; done; # push all words against the wiki plugin dont forget setting user & password in /usr/local/bin/micro-wiki
###################################################################################
# try to follow the logic combine
# your-word=micro new ? ->concept->concepts->relations->node
$ micro new biology
$ micro new biological_process
$ for i in `micro structures`; do
$ for y in `micro all $i `; do
$ echo "$i=$y";
$ micro new $y;
$ done
$ done
#!!!!!###Hard cpu to expect ### make sure couch is on ###### or disable the store methode in micro-wiki and print $doc or consume otherweise
# test as single before you loope
$ micro-wiki ufo
# proceed
$ for i in `micro structures`; do
$ for y in `micro all $i `; do
$ echo "$i=$y";
$ micro-wiki $y;
$ done
$ done
```
```
one way more easy would be to steam a large amount knowledge over complete discipline structure and categorize it on the smallest node .
then we sort density and lower the scope to compute compounding
by the factor the density map is large.
as more detailed the steaming becomes minimum for compounding (math formulas , corresponding arithmetic)
the Categorizer has to adapt but we will have him well trained with the initial steam.
all left to compounding is the hypothesis and experiment compatible with harvested formulas and arithmetic
on a very small scope or adjustable by density.
:)
my $file = shift;
my $encoder = JSON->new->allow_blessed->pretty(0);
sub soundex
{
#my $dir = shift;
my $file = shift;
push @_,$file;
local( @res ) = map {$_=$_}@_; local($i, $t,$_);
for ( @res ) { tr/a-zA-Z//cd; tr/a-zA-Z/A-ZA-Z/s;
($i,$t) = /(.)(.*)/;
$t =~ tr/BFPVCGJKQSXZDTLMNRAEHIOUWY/111122222222334556/sd;
$_ = substr(($i||'Z').$t.'000', 0, 4 );
}
# move($file,$targetdir);
return {$file=>[grep(!/000/,@res)]};
}
open my $info, $file or die "Could not open $file: $!";
my @line = map{try{$encoder->decode($_)};}<$info>;
close $info;
bin/from-folder.pl view on Meta::CPAN
}
find(\&translate, "$TOP");
p @{[keys %$files,reverse @ARGV,$storage]};
__DATA__
our $c = AI::MicroStructure::Context->new(@ARGV);
$c->retrieveIndex($PWD."/t/docs"); #"/home/santex/data-hub/data-hub" structures=0 text=1 json=1
my $style = {};
$style->{explicit} = 1;
ok($c->simpleMixedSearch($style,$_)) && ok($c->play($style,$_)) for
qw(atom antimatter planet);
bin/getcat.pl view on Meta::CPAN
use File::Find::Rule;
use strict;
use warnings;
use JSON;
use Cache::Memcached::Fast;
use Try::Tiny;
use Data::Dumper;
use Digest::MD5 qw(md5 md5_hex md5_base64);
our $memd = new Cache::Memcached::Fast({
servers => [ { address => 'localhost:11211', weight => 2.5 }],
namespace => 'my:',
connect_timeout => 0.2,
io_timeout => 0.1,
close_on_error => 1,
compress_threshold => 100_000,
compress_ratio => 0.9,
max_failures => 1,
max_size => 512 * 1024,
});
our $all = {};
our $json = JSON->new->allow_nonref;
sub mytry{
my $cmd = shift;
bin/getfiles.sh view on Meta::CPAN
mojo get "https://en.wikibooks.org/w/index.php?title=Special:Search&limit=100&offset=0&ns6=0&search=crime" ".mw-search-results" | sed -s "s/\"\/\//\"http:\/\//" > crime.files.html
bin/localfiles view on Meta::CPAN
use warnings;
use JSON;
use Cache::Memcached::Fast;
use AI::MicroStructure;
use Data::Dumper;
my $data={};
our $memd = new Cache::Memcached::Fast({
servers => [ { address => 'localhost:11211', weight => 2.5 }],
namespace => 'my:',
connect_timeout => 0.2,
io_timeout => 0.1,
close_on_error => 1,
compress_threshold => 100_000,
compress_ratio => 0.9,
max_failures => 1,
max_size => 512 * 1024,
});
my @result = ();
my $rule;
foreach(@ARGV){
$rule = File::Find::Rule->file->name("*$_*.*")->start("/home/santex/data-hub/stock/" ,"/home/santex/Pictures/1");
while ( defined ( my $image = $rule->match ) ) {
push @result,$image;
}
print join("\n", @result);
}
__DATA__
my $micro = AI::MicroStructure->new("any");
my $path = $micro->{state}->{cwd};
my $picdir = sprintf("%s/%s",$ENV{"HOME"},"Pictures/1");
my $pubdir = sprintf("%s/%s",$ENV{"HOME"},"public_html");
push @INC ,-d $path ? $path : $ENV{"HOME"};
push @INC ,-d $picdir ? $picdir :"";
push @INC ,-d $pubdir ? $picdir :"";
my $xx=$memd->get("localfile_".$match);
if(!$xx){
my @images = File::Find::Rule->file()
->name('*'.lc($match).'*\.(png|jpg|gif|svg)')
->in(@INC);
#my $dat = {};
#foreach(@images){
#my @d = split("/",$_);
# $dat->{shift @d} = $_;
#}
#@images = values $dat;#@images[0..500] unless $#images<500;
#$data->{images}=[@images];
#my $cmd = sprintf( "montage '%s' /home/santex/Pictures/montage/".$match."-all.jpg",join("' '",@{$data->{images}}));
#`$cmd`;
my @files = File::Find::Rule->file()
->name('*'.ucfirst($match).'*\.(pdf|json|txt|xml)')
->in(@INC);
# print join "\n",sort{$a cmp $b}@files;
$data->{files}=[@files];
my $j = encode_json($data);
use AI::MicroStructure::Util;
use Getopt::Long;
use AI::MicroStructure;
use Data::Printer;
use Data::Dumper;
use JSON::XS;
use Try::Tiny;
use Cache::Memcached::Fast;
my %conf = ( );
our $keys = {};
GetOptions( \%conf, "whitespace|ws!", "version","structures", "help", "remote","new",
"init", "export", "import",
"check", "category=s", "sources" ,"drop");
our ($new, $write,$drop,$all,$verbose) =(0,0,0,0,0);
our $kkey = sprintf "%s",join("_",@ARGV);
our $argkey = md5_hex($kkey);
our $memd = "";
sub check {
}
sub init {
$memd = new Cache::Memcached::Fast({
servers => [ { address => 'localhost:11211', weight => 2.5 }],
namespace => 'my:',
connect_timeout => 0.2,
io_timeout => 0.1,
close_on_error => 1,
compress_threshold => 100_000,
compress_ratio => 0.9,
max_failures => 1,
max_size => 512 * 1024,
});
if(!$#ARGV){
push @ARGV,"any";
}
if($kkey =~ /debug/){
my $NORMAL=`tput sgr0`;
my $REVERSE=`tput smso`;
print "$REVERSE $_ $NORMAL " for @ARGV;
print "\n";
}else{
}
if(defined(my $ret = $memd->get($argkey)) && ($kkey !~ m/(any|structures)/i) && @ARGV){
print "$ret\n";
exit;
#die($ret);
}else{
}
}
exit;
} else {
if (!-e ".micro" && !-e $ENV{HOME}."/.micro") {
print STDERR "this directory is not an active memory!\n";
exit;
}
}
my $state = AI::MicroStructure::Util::load_config(); my @CWD=$state->{cwd}; my $config=$state->{cfg};
our $structdir = "structures";
our $absstructdir = "$CWD[0]/$structdir";
if ($conf{"export"}) {
my $cwd = $CWD[0];
my $hash = $main->fitnes();
my $url = sprintf("%s/%s/_all_docs", $config->{couchdb}, $config->{db});
print `cd $cwd && mkdir -p relations && wget -O relations/any.json $url && git add relations/any.json $structdir/*.pm && git commit -m 'active memory release' && git tag $hash`; # FIXME check for errors FIXME also that we commit per structure and...
exit;
}
my (@remote, @local);
# real processing starts here
$\ = $/;
my $sep = $conf{whitespace} ? ' ' : $\;
my $j = $main->structures();
if($j == 0 || $j eq "any"){
print $main->help;
exit(0);
}
sub is_integer {
defined $_[0] && $_[0] =~ /^[+-]?\d+$/;
foreach(@ARGV){
push @tmp,$_ unless($_=~/$key/);}
@ARGV=@tmp;
}
my $structure;
if(defined($ARGV[0]) && $ARGV[0] =~ m/structures/){
@local = grep{!/any/}AI::MicroStructure->new()->structures();
if(defined($ARGV[1]) && is_integer($ARGV[1])){
my $index = rand $#local;
$index = $index-$ARGV[1];
$index = $index?$index:0;
@local = @local[$index+1..$index+$ARGV[1]];
}
my $val = sprintf "%s",join $sep, @local, @remote;
$memd->set($argkey,$val);
print "$val";
exit;
}
if(defined($ARGV[0]) && $ARGV[0] =~ m/structures/){
@local = grep{!/any/}AI::MicroStructure->new()->structures();
if(defined($ARGV[1]) && is_integer($ARGV[1])){
my $index = rand $#local;
$index = $index-$ARGV[1];
$index = $index?$index:0;
@local = @local[$index+1..$index+$ARGV[1]];
}
my $val = sprintf "%s", join $sep, @local, @remote;
$memd->set($argkey,$val);
print "$val";
exit;
}
if($conf{"new"} and $ARGV[0] !~/structures/ and $ARGV[0] =~ m{^([^/]+)/(.*)}s) {
$structure = $1;
$conf{category} = $2;
my $meta = AI::MicroStructure->new( $structure, category => "new" );
$memd->set($argkey,$meta);
p $meta;
exit;
}
if(!$conf{"drop"} && !$conf{"write"}and $ARGV[0] !~/structures/){
# find out the structure name
$structure = shift || $AI::MicroStructure::structure;
if (!length $conf{category} && $structure =~ m{^([^/]+)/(.*)}s) {
$structure = $1;
$conf{category} = $2;
}
die "structure '$structure' is not updatable!\n"
unless $module->has_remotelist();
}
# informative options
print STDERR
"meta, a simple front-end to AI::MicroStructure version $AI::MicroStructure::VERSION\n"
if $conf{version};
print STDERR $main->help if $conf{help};
print map "$_\n", AI::MicroStructure->structures if $conf{structures};
if ( $conf{sources} ) {
my @sources = $module->sources( $conf{category} );
my $var = map "$_\n", @sources;
$memd->set($argkey,$var);
print $var;
exit;
}
exit if $conf{structures} || $conf{version} || $conf{help} || $conf{sources};
my $meta = AI::MicroStructure->new( $structure, category => $conf{category} );
@remote = $module->remote_list( $conf{category} )
if $conf{remote} || $conf{check};
if ( !$conf{remote} ) {
my $count = shift;
$count = 1 unless defined $count;
$count = 0 if $conf{check};
bin/micro-dict view on Meta::CPAN
stop=$(perl -MAI::MicroStructure::WordBlacklist -E "my \$s=AI::MicroStructure::WordBlacklist::getStopWords('de'); my @s = keys %\$s; print join('|',@s);")
IFS=$'\n';
$cmd $1 | tr A-Z a-z | # Convert to lowercase.
tr ' ' '_' | # New: change spaces to newlines.
#tr -cd '\012[a-z][0-9]' | # Get rid of everything
#+ non-alphanumeric (in orig. script).
tr -c '\012a-z' '\012' | # Rather than deleting non-alpha
egrep -v '^#' | # Delete lines starting with hashmark.
egrep -v "^[ ]*([A-Za-z][A-Za-z]|[A-Za-z])$" | egrep -v "^$" | egrep -v -i "^ (denkbarer|ganze|bez|ver�ffentlichtes|uns�gliches|ungew�hnliche|vollstaendig|erstem|Inf.|titel|unsaeglichem|beforehand|denkbares|yours|contains|gedurft|seithe...
stop=$(perl -MAI::MicroStructure::WordBlacklist -E "my \$s=AI::MicroStructure::WordBlacklist::getStopWords('de'); my @s = keys %\$s; print join('|',@s);")
cat /tmp/micro-dict.tmp | sort -n | egrep -v "^.*.[\ ].*.[1-9][\:][\ ][\ ]($stop)";
#if [ ! "$(echo "$stop" | egrep -i zzzzzzzzzzzz)" ]; then echo cool; fi
bin/micro-dict~ view on Meta::CPAN
then #+ valid file argument.
cmd=cat
else
cmd=echo
fip
stop=$(perl -MAI::MicroStructure::WordBlacklist -E "my \$s=AI::MicroStructure::WordBlacklist::getStopWords('de'); my @s = keys %\$s; print join('|',@s);")
res=$($cmd $1 | tr A-Z a-z | # Convert to lowercase.
tr ' ' '_' | # New: change spaces to newlines.
tr -c '\012a-z' '\012' | # Rather than deleting non-alpha
egrep -v "^[ ]*([A-Za-z][A-Za-z]|[A-Za-z])$" | egrep -v "^$");
echo "$res"
}
function masher(){
if [ -f "$1" ]
then #+ valid file argument.
bin/micro-relation view on Meta::CPAN
use Try::Tiny;
my $lang = $ENV{MICRO_LANG} || "en" ;
my $wiki = WWW::Wikipedia->new(language => $lang);
use Cache::Memcached::Fast;
our $memd = new Cache::Memcached::Fast({
servers => [ { address => 'localhost:11211', weight => 2.5 }],
namespace => 'my:',
connect_timeout => 0.2,
io_timeout => 0.1,
close_on_error => 1,
compress_threshold => 100_000,
compress_ratio => 0.9,
max_failures => 1,
max_size => 512 * 1024,
});
sub decruft {
my($file) = @_;
my($cruftSet) = q{%ç&|#[^+*(]),'";};
my $clean = $file;
bin/micro-relation view on Meta::CPAN
sub rel {
my $arg = shift;
my $lang = shift;
if(defined(my $fromCache = $memd->get($arg))){
return $fromCache;
}
my $result = $wiki->search($arg);
my $str = "";
if (defined($result) && $result->text() ) {
try{
$str = join( "\n", $result->related() );
$str = decruft($str);
$memd->set($arg,$str);
};
}
return $str;
}
try{
print rel(eval qw{$_}, $lang) for @ARGV;
};
bin/micro-relation-test view on Meta::CPAN
use WWW::Wikipedia;
use Try::Tiny;
my $lang = $ENV{MICRO_LANG} || "en" ;
my $wiki = WWW::Wikipedia->new(language => $lang);
use Cache::Memcached::Fast;
my $memd = new Cache::Memcached::Fast({
servers => [ { address => 'localhost:11211', weight => 2.5 }],
namespace => 'my:',
connect_timeout => 0.2,
io_timeout => 0.5,
close_on_error => 1,
compress_threshold => 100_000,
compress_ratio => 0.9,
compress_methods => [ \&IO::Compress::Gzip::gzip,
\&IO::Uncompress::Gunzip::gunzip ],
max_failures => 3,
failure_timeout => 2,
ketama_points => 150,
nowait => 1,
hash_namespace => 1,
serialize_methods => [ \&Storable::freeze, \&Storable::thaw ],
utf8 => ($^V ge v5.8.1 ? 1 : 0),
max_size => 512 * 1024,
});
bin/micro-relation-test view on Meta::CPAN
$clean=~s/\Q$_//g for split("",$cruftSet);
return $clean;
}
sub rel {
my ($arg,$lang) = @_;
my $result = $wiki->search($arg);
my $str = "";
if (defined($result) && $result->text() ) {
$str = join( "\n", $result->related() );
}
return $str;
}
foreach my $call(@ARGV)
{
bin/micro-rename view on Meta::CPAN
#!/bin/bash
IFS_BAK=$IFS;
IFS=$'\n';
# blank-rename.sh
#
# Substitutes underscores for blanks in all the filenames in a directory.
filename=$1
ONE=1 # For getting singular/plural right (see below).
number=0 # Keeps track of how many files actually renamed.
FOUND=0 # Successful return value.
fname=$1 # Yes, this filename needs work.
n=`echo $fname | sed -e "s/ /_/g" | sed -e "s/'//g" | sed -e "s/&/and/g" | tr A-Z a-z | sed -e "s/)/_/g" | sed -e "s/(/_/g" | sed -e "s/\[//g" | sed -e "s/\]//g" | sed -e "s/\,//g" | sed -e "s/\;//g"` #
# | sed -e "s/[/_/g" | sed -e "s/]//g" | sed -e "s/)//g" | sed -e "s/(//g"`
mv "$1" "$n" > /dev/null;
bin/micro-sense view on Meta::CPAN
use AnyDBM_File;
use Fcntl;
use Data::Dumper;
use JSON;
use AI::MicroStructure::WordBlacklist;
my @set;
my $data = {};
my %structure;
my $fresh=1;
my $wn;
my $debug = 0;
my $words = 1;
my $count = 0;
if( grep{/\bdebug\b/} @ARGV ){$debug = 1; cleanArgs("debug"); };
if( grep{/\bwords\b/} @ARGV ){$words = 1; cleanArgs("words"); };
sub cleanArgs{
bin/micro-sense view on Meta::CPAN
$string = "" unless $string;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
$string =~ s/\t//;
$string =~ s/^\s//;
return $string;
}
$structure{"x",1} = "\nData: Hello, my name is Data!\nThank you for reactivating me !";
$structure{"x",2} = "\nData: My post-hypnotic positron inducer signals all systems within normal parameters!\n";
$structure{"x",3} = "\nData: Please think of an category and I will try to get some structures to it - press enter when ready\n";
sub forms
{
my ($string) = shift;
# The query string (word, pos and sense #)
my ($word, $pos, $sense) = $string =~ /^([^\#]+)(?:\#([^\#]+)(?:\#(\d+))?)?$/;
return $string;
}
bin/micro-soundex view on Meta::CPAN
use File::Copy;
use Data::Dumper;
use Data::Printer;
sub soundex
{
p @_;
my $dir = `pwd | tr -d "\n"`;
my $file = shift;
push @_,$file;
local( @res ) = map {$_=$_}@_; local($i, $t,$_);
for ( @res ) { tr/a-zA-Z//cd; tr/a-zA-Z/A-ZA-Z/s;
($i,$t) = /(.)(.*)/;
$t =~ tr/BFPVCGJKQSXZDTLMNRAEHIOUWY/111122222222334556/sd;
$_ = substr(($i||'Z').$t.'000', 0, 4 );
}
my $maindir = substr($res[0],0,1);
my $targetdir = sprintf("%s/%s/%s",$dir, $maindir,substr($res[0],0,2));
if(! -d $targetdir){
# `mkdir -p $targetdir`;
}
# move($file,$targetdir);
return [$dir,$targetdir,@res,substr($res[0],0,2),$file];
}
#print Dumper glob '*/*json';
print Dumper soundex(@ARGV);
bin/micro-wiki view on Meta::CPAN
my @CWD = $state->{cwd};
our $config = $state->{cfg};
die("require a argument") unless($ARGV[0]);
our $doc ={};
our @links;
our $linkdata = {};
our $result;
our $odir = "";
my $url = $ARGV[0];
my @inx;
my @test;
my $search="";
my $TOP="wikipedia";
my $carry = {count=>0,max=>0};
bin/micro-wiki view on Meta::CPAN
my ($idx,$url) = @_;
print $idx;
print $url;
if($url){
my $ua = LWP::UserAgent->new;
$response = $ua->get(sprintf("%s%s",$config->{wikipedia}, ucfirst($url)));
$e->parse($response->decoded_content);
return $e->links;
}
}
sub call {
my ($idx,$url) = @_;
my $ua = LWP::UserAgent->new;
my $content ;
my $response ="";
my @book = ();
$response = $ua->get(sprintf("%s%s",$config->{wikipedia}, ucfirst($url)));
my $doc={};
my $linkdata={};
my $wiki = WWW::Wikipedia->new();
my $hs = HTML::Strip->new();
my $result = $wiki->search(ucfirst $url);
if (defined($result) && $result->text() ) {
my $clean_text = $hs->parse($result->text() );
$hs->eof;
require HTML::SimpleLinkExtor;
no warnings 'utf8';
my $e = HTML::SimpleLinkExtor->new();
$e->parse($response->decoded_content);
my @all_links = $e->links;
my @tags= map{$_=lc($_); $_=~s/\)|\/wiki\///g; $_=~s/ /_/g; $_=[split("_\\(",$_)] }grep {/([(].+?[)]|$url)/}@all_links ;# $result->related();
my @audio = grep{/^(\/\/|upload|http).*.(mp3|wave|ogg|OGG|WAVE|MP3)$/}@all_links;
my @pdf = grep{/^(\/\/|upload|http).*.(pdf|PDF)$/}@all_links;
my @book = grep{/books.google/i}@all_links;
foreach(@tags){
if($_->[1] && $_->[1]!~/\W/){
$doc->{tags}->{$_->[1]}->{$_->[0]} = $doc->{tags}->{$_->[1]}->{$_->[0]} ? $doc->{tags}->{$_->[1]}->{$_->[0]} +1:1;
}
}
$doc->{image}=[map{$_="http:$_"; }grep{/[1-9][0-9][0-9]px/}$e->img];
$doc->{cat}=[grep{/^.*.(Kategory|Category)+?/}@all_links];
$doc->{cat}=[sort grep{!/(category|wikipedia|article|page|List.*.of)/i}map{$a=$_; $a =~ s/^.*.://g; $_=$a;}@{$doc->{cat}}];
$doc->{list}=[grep{/List.*.of_/}@all_links];
$doc->{list}=[sort map{$a=$_; $a=~ s/^.*.List/List/g; $_=$a;}@{$doc->{list}}];
$doc->{book}= [@book] unless(!@book);
$doc->{pdf}= [@pdf] unless(!@pdf);
$doc->{audio}= [@audio] unless(!@audio);
$doc->{related} = quantify $result->related();
$doc->{links} = [sort grep{/http/}@all_links];
#eval '$couchdb->store("$url" ,$doc)' or warn "error: $@\n";
# createJsonFile($url,$doc);
p $doc;
bin/micro-wiki view on Meta::CPAN
}
our @out = ();
foreach my $urlx (@ARGV) {
if($urlx) { $result->{$urlx} = call(0,$urlx); }
}
1;
bin/remote.pl view on Meta::CPAN
sub new {
my $class = shift;
no strict 'refs';
my $self = bless { @_, cache => [] }, $class;
# compute some defaults
$self->{category} ||= ${"$class\::Default"};
# fall back to last resort (FIXME should we carp()?)
$self->{category} = ${"$class\::Default"}
if $self->{category} ne ':all'
&& !exists ${"$class\::KnowHow"}{ $self->{category} };
$self->_compute_base();
return $self;
}
sub _compute_base {
my ($self) = @_;
bin/remote.pl view on Meta::CPAN
if ($@) {
carp "LWP::UserAgent not available: $@";
return;
}
# fetch the content
my @items;
my @srcs = $class->sources($_[1]);
my $ua = LWP::UserAgent->new( env_proxy => 1 );
foreach my $src (@srcs) {
my $res = $ua->request( HTTP::Request->new( GET => $src ) );
if ( ! $res->is_success() ) {
carp "Failed to get content at $src (" . $res->status_line();
return;
}
# extract, cleanup and return the data
# if decoding the content fails, we just deal with the raw content
push @items =>
$class->extract( $res->decoded_content() || $res->content() );
}
# return unique items
my %seen;
return grep { !$seen{$_}++ } @items;
}
#
# transformation subroutines
bin/remote.pl view on Meta::CPAN
Calli_Cox
Cameron_Cain
Cameron_James
Candida_Royalle
Candie_Evans
Candy_Barr
Candy_Manson
Candy_Samples
Cara_Lott
Careena_Collins
Caressa_Savage
Carmella_Bing
Carmen_Hayes
Carmen_Luvana
Carol_Connors
Carol_Cummings
Caroline_Pierce
Casey_James
Cassandra_Wild
Catalina_Cruz
Celeste
bin/remote.pl view on Meta::CPAN
Lisa_Ann
Lisa_De_Leeuw
Lisa_K_Loring
Lisa_Sparxxx
Little_Oral_Annie
Liz_Harvey
Liz_Honey
Liz_Vicious
Liza_Harper
Logan_LaBrent
Lois_Ayres
Lolo_Ferrari
Loni_Sanders
Lorelei
Loretta_Loren
Lori_Alexia
Lou_Valmont
Lovette
Lucie_Stratilova
Lucy_Lee
Lucy_Thai
bin/remote.pl view on Meta::CPAN
Mika_Tan
Miko_Lee
Mimi_Miyagi
Mindy_Rae
Mindy_Vega
Minka
Miriam_Gonzalez
Miss_Arroyo
Missy
Missy_Monroe
Mistress_Yvette
Misty_Rain
Moana_Pozzi
Mocha
Molly_Rome
Monica_Cameron
Monica_Mayhem
Monica_Sweet
Monica_Sweetheart
Monique_Alexander
Monique_DeMoan
bin/remote.pl view on Meta::CPAN
Tanya_James
Tawnee_Stone
Tawny_Roberts
Tawny_Pearl
Taylor_Hayes
Taylor_Hill
Taylor_Lyn
Taylor_Rain
Taylor_St_Clair
Taylor_Wane
Teagan_Presley
Teanna_Kai
Teena_Fine
Temptress
Tera_Heart
Tera_Patrick
Teresa_May
Teresa_Scott
Teri_Diver
Teri_Weigel
Terri_Summers
Texas_Presley
Tia_Bella
Tia_Tanaka
Tianna
Tianna_Lynn
Tiffany_Diamond
Tiffany_Holiday
Tiffany_Hopkins
Tiffany_May
Tiffany_Million
Tiffany_Mynx
bin/remote.pl view on Meta::CPAN
Nacho_Vidal
Nat_Turnher
Nick_East
Nick_Lang
Nick_Manning
Nikko_Knight
Matt_Bixel
Neeo
Pascal_Saint
Pat_Myne
Paul_Barresi
Paul_Cox
Paul_Thomas
Peter_Foster
Peter_Ho
Peter_North
Peter_Shaft
Philippe_Dean
Philippe_Soine
Pier_Evergreen
Pierre_Woodman
Preston_Parker
Randy_Spears
Randy_West
Ray_Victory
Remigio_Zampa
Ricardo_Bell
Richard_Langin
Rich_Handsome
Rick_Masters
Rick_Lee
Rob_Rotten
lib/AI/MicroStructure.pm view on Meta::CPAN
$version,$help,$write,$verbose) = (0,0,0,0,0,0,0,0,0,0,0,0,0,0);
eval "\$$_=1; " for @ARGV;
if( grep{/\bnew\b/} @ARGV ){ $new = 1; cleanArgs("new"); }
if( grep{/\bwrite\b/} @ARGV ){ $write = 1; cleanArgs("write"); };
if( grep{/\bdrop\b/} @ARGV ){ $drop = 1; cleanArgs("drop"); };
if( grep{/\bverbose\b/} @ARGV ){ $verbose = 1; cleanArgs("verbose"); };
our $StructureName = $ARGV[0]; # default structure
our $structure = $ARGV[0]; # default structure
our $state = AI::MicroStructure::Util::config();
our @CWD=();
push @CWD , $state->{path}->{"cwd/structures"};
our $config = $state->{cfg};
our $micro = AI::MicroStructure->new($Structure);
$absstructdir = $state->{path}->{"cwd/structures"};
sub cleanArgs{
my ($key) = @_;
my @tmp=();
foreach(@ARGV){
push @tmp,$_ unless($_=~/$key/);}
@ARGV=@tmp;
}
# private class method
sub find_structures {
my ( $class, @dirs ) = @_;
$ALIEN{"base"} = [map @$_,
map { [ ( fileparse( $_, qr/\.pm$/ ) )[0] => $_ ] }
map { File::Glob::bsd_glob(
File::Spec->catfile( $_, ($structdir,"*") ) ) } @dirs];
return @{$ALIEN{"base"}};
}
# fetch the list of standard structures
sub find_modules {
my $structures = {};
foreach(@INC)
{
my @set = grep /($str)/, map @$_,
map { [ ( fileparse( $_, qr/\.pm$/ ) )[0] => $_ ] }
map { File::Glob::bsd_glob(
File::Spec->catfile( $_, qw( AI MicroStructure *.pm ) ) ) } $_;
foreach(@set){
$structures->{$_}=$_;# unless($_=~/(usr\/local|basis)/);
}
}
return %$structures;
}
$MICRO{$_} = 0 for keys %{{__PACKAGE__->find_structures(@CWD)} };
$MODS{$_} = $_ for keys %{{__PACKAGE__->find_modules(@INC)} };
$search = join("|",keys %MICRO);
BEGIN{
use File::HomeDir;
my $fileDir = File::HomeDir->my_home . "/data-hub/structures/";
my $fileSpec = File::HomeDir->my_home . "/data-hub/structures/any.pm";
if ( -e $fileSpec ) {
} else {
mkdir($fileDir);
warn "missing:$fileSpec";
}
}
sub getComponents{
my $x= {};
$x->{"all_structures"} = [keys %MICRO];
$x->{"count_struct"} = sprintf(keys %MICRO);
$x->{"structures"} = {};
foreach my $con (@{$x->{"all_structures"}}){
next unless($con!~/any/);
my @in = split("\n",eval{`cat $state->{path}->{"cwd/structures"}/$con.pm`;});
$x->{"structures"}->{$state->{path}->{"cwd/structures"}}->{$con}->{name} =
[grep{$_}grep {!/(our|my|use|sub|use|package|#|__|1)/}split("\n",`cat $state->{path}->{"cwd/structures"}/$con.pm`)];#,
$x->{"structures"}->{$state->{path}->{"cwd/structures"}}->{$con}->{files} =
[split("\n",`ls -R /home/santex/repos/KnowledgeInterDisciplinary/data/json | egrep -i "($con)";`)];
}
return $x;
}
sub import {
my $class = shift;
my @structures = ( grep { $_ eq ':all' } @_ )
? ( 'foo', grep { !/^(?:foo|:all)$/ } keys %MICRO ) # 'foo' is still first
: @_;
$Structure = $structures[0] if @structures;
$micro = AI::MicroStructure->new( $Structure );
# export the microname() function
no strict 'refs';
my $callpkg = caller;
*{"$callpkg\::microname"} = \µname; # standard theme
# load the classes in @structures
for my $structure( @structures ) {
eval "require AI::MicroStructure::$structure; import AI::MicroStructure::$structure;";
croak $@ if $@;
*{"$callpkg\::micro$structure"} = sub { $micro->name( $structure, @_ ) };
}
}
sub new {
my ( $class, @args ) = ( @_ );
my $structure;
$structure = shift @args if @args % 2;
$structure = $Structure unless $structure; # same default everywhere
lib/AI/MicroStructure.pm view on Meta::CPAN
bless { structure => $structure, args => { @args }, micro => {} ,state=>$state}, $class;
}
sub _rearrange{
my $self = shift;
$self->{'payload'} = shift if @_;
return %$self;
}
# CLASS METHODS
sub add_structure {
my $class = shift;
my %structures = @_;
for my $structure ( keys %structures ) {
croak "The structure $structure already exists!" if exists $MICRO{$structure};
my @badnames = grep { !/^[a-z_]\w*$/i } @{$structures{$structure}};
croak "Invalid names (@badnames) for structure $structure"
if @badnames;
my $code = << "EOC";
package AI::MicroStructure::$structure;
use strict;
use AI::MicroStructure::List;
our \@ISA = qw( AI::MicroStructure::List );
our \@List = qw( @{$structures{$structure}} );
__PACKAGE__->init();
1;
EOC
eval $code;
$MICRO{$structure} = 1; # loaded
# export the microstructure() function
no strict 'refs';
my $callpkg = caller;
*{"$callpkg\::micro$structure"} = sub { $micro->name( $structure, @_ ) };
}
lib/AI/MicroStructure.pm view on Meta::CPAN
for( @items, $item ) {
$$_ =~ s/\A\s*//;
$$_ =~ s/\s*\z//;
$$_ =~ s/\s+/ /g;
}
return $data;
}
#fitnes
sub fitnes {
my $self = shift;
return sha1_hex($self->structures());
##my ($config,$structure, $config ) = (shift,[$self->structures()]); FIXME
}
# main function
sub microname { $micro->name( @_ ) };
sub shitname {
my $self = shift;
my ( $structure, $count ) = ("any",1);
if (@_) {
( $structure, $count ) = @_;
( $structure, $count ) = ( $self->{structure}, $structure )
if $structure =~ /^(?:0|[1-9]\d*)$/;
lib/AI/MicroStructure.pm view on Meta::CPAN
eval "require '$absstructdir/$structure.pm';";
$MICRO{$structure} = 1; # loaded
$self->{micro}{$structure} = AI::MicroStructure->new($structure,category => $category);
print $self->{micro}{$structure}->name( $count );
return;
} catch{
}
}
}
}
# corresponding method
sub name {
my $self = shift;
my ( $structure, $count ) = ("any",1);
if (@_) {
( $structure, $count ) = @_;
( $structure, $count ) = ( $self->{structure}, $structure )
if defined($structure) && $structure =~ /^(?:0|[1-9]\d*)$/;
}
else {
( $structure, $count ) = ( $self->{structure}, 1 );
lib/AI/MicroStructure.pm view on Meta::CPAN
if( ! $MICRO{$structure} ) {
eval "require '$absstructdir/$structure.pm';";
croak "MicroStructure list $structure does not exist!" if $@;
$MICRO{$structure} = 1; # loaded
}
$self->{micro}{$structure} =
"AI::MicroStructure::$structure"->new( %{ $self->{args} } );
}
$self->{micro}{$structure}->name( $count );
}
# corresponding method
sub namex {
my $self = shift;
my ( $structure, $count ) = ("any",1);
if (@_) {
( $structure, $count ) = @_;
( $structure, $count ) = ( $self->{structure}, $structure )
if defined($structure) && $structure =~ /^(?:0|[1-9]\d*)$/;
}
else {
( $structure, $count ) = ( $self->{structure}, 1 );
lib/AI/MicroStructure.pm view on Meta::CPAN
croak "MicroStructure list $structure does not exist!" if $@;
}catch{
}
}
$self->{micro}{$structure} =
"AI::MicroStructure::$structure"->new( %{ $self->{args} } );
}
$self->{micro}{$structure}->name( $count );
}
# other methods
sub structures { wantarray ? ( sort keys %MICRO ) : scalar keys %MICRO }
sub has_structure { $_[1] ? exists $MICRO{$_[1]} : 0 }
sub configure_driver { $_[1] ? exists $MICRO{$_[1]} : 0 }
sub count {
my $self = shift;
my ( $structure, $count );
if (@_) {
( $structure, $count ) = @_;
( $structure, $count ) = ( $self->{structure}, $structure )
if $structure =~ /^(?:0|[1-9]\d*)$/;
}
lib/AI/MicroStructure.pm view on Meta::CPAN
my $string = shift;
$string = "" unless $string;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
$string =~ s/\t//;
$string =~ s/^\s//;
return $string;
}
sub getBundle {
my $self = shift;
my @structures = grep { !/^(?:any)/ } AI::MicroStructure->structures;
my @micros;
my @search=[];
for my $structure (@structures) {
no strict 'refs';
eval "require '$absstructdir/$structure.pm';";
my %isa = map { $_ => 1 } @{"AI::MicroStructure::$structure\::ISA"};
if( exists $isa{'AI::MicroStructure::Locale'} ) {
for my $lang ( "AI::MicroStructure::$structure"->languages() ) {
push @micros,
["AI::MicroStructure::$structure"->new( lang => $lang ),$lang];
}
}
elsif( exists $isa{'AI::MicroStructure::MultiList'} ) {
lib/AI/MicroStructure.pm view on Meta::CPAN
my $self = shift;
my $structure = shift;
my $data = shift;
my $usage = "";
$usage = "#!/usr/bin/perl -W\n";
$usage .= << "EOC";
package AI::MicroStructure::$structure;
use strict;
use AI::MicroStructure::List;
our \@ISA = qw( AI::MicroStructure::List );
our \@List = qw( \@{\$structures{\$structure}} );
__PACKAGE__->init();
1;
EOC
my $new = {};
foreach my $k
(grep{!/^[0-9]/}map{$_=$self->trim($_)}@{$data->{rows}->{"search"}}){
$k =~ s/[ ]/_/g;
$k =~ s/[\(]|[\)]//g;
next if($k=~/synonyms|hypernyms/);
print $k;
lib/AI/MicroStructure.pm view on Meta::CPAN
1;
__END__
#print Dumper $micro;
# ABSTRACT: AI::MicroStructure Creates Concepts for words
=head1 NAME
AI::MicroStructure
=head1 DESCRIPTION
Creates Concepts for words
=head1 SYNOPSIS
~$ micro new world
~$ micro structures
~$ micro any 2
~$ micro drop world
~$ micro
=head1 AUTHOR
Hagen Geissler <santex@cpan.org>
=head1 COPYRIGHT AND LICENCE
Hagen Geissler <santex@cpan.org>
=head1 SUPPORT AND DOCUMENTATION
[sample using concepts](http://active-memory.de:2323/nerd?param=perl#ajax/home)
[PDF info on my works](https://github.com/santex/AI-MicroStructure)
lib/AI/MicroStructure/Alias.pm view on Meta::CPAN
=head1 DESCRIPTION
This structure is just an alias of the C<batman> theme.
=cut
# no __DATA__ section required!
=head1 DESCRIPTION
C<AI::MicroStructure::Alias> is the base class for any structures that is
simply an alias of another structure.
=head1 METHOD
AI::MicroStructure::Alias defines a single method, C<init()> that
make aliases very easy to write (see the full example in L<SYNOPSIS>):
=over 4
=item init( $original )
lib/AI/MicroStructure/List.pm view on Meta::CPAN
=cut
__DATA__
# names
john paul
george ringo
=head1 DESCRIPTION
C<AI::MicroStructure::List> is the base class for all structures that are
meant to return a random excerpt from a predefined list.
=head1 METHOD
AI::MicroStructure::List offers several methods, so that the subclasses
are easy to write (see full example in L<SYNOPSIS>):
=over 4
=item new()
lib/AI/MicroStructure/Locale.pm view on Meta::CPAN
# support for territories
if ( $cat && $cat ne ':all' ) {
($cat) = $cat =~ /^([-A-Za-z_]+)/;
$cat = lc( $cat || '' );
1 while $cat
&& !exists ${"$class\::MultiList"}{$cat}
&& $cat =~ s/_?[^_]*$//;
}
# fall back to last resort
$self->{category} = $cat || ${"$class\::Default"};
$self->_compute_base();
return $self;
}
sub categories {
my $class = shift;
$class = ref $class if ref $class;
no strict 'refs';
lib/AI/MicroStructure/Locale.pm view on Meta::CPAN
1;
__END__
=head1 NAME
AI::MicroStructure::Locale - Base class for multilingual structures
=head1 SYNOPSIS
package AI::MicroStructure::digits;
use AI::MicroStructure::Locale;
our @ISA = ( AI::MicroStructure::Locale );
__PACKAGE__->init();
1;
=head1 NAME
lib/AI/MicroStructure/Locale.pm view on Meta::CPAN
zero one two three four five six seven eight nine
# names fr
zero un deux trois quatre cinq six sept huit neuf
# names it
zero uno due tre quattro cinque sei sette otto nove
# names yi
nul eyn tsvey dray fir finf zeks zibn akht nayn
=head1 DESCRIPTION
C<AI::MicroStructure::Locale> is the base class for all structures that are
meant to return a random excerpt from a predefined list I<that depends
on the language>.
The language is selected at construction time from:
=over 4
=item 1.
the given C<lang> or C<category> parameter,
lib/AI/MicroStructure/Locale.pm view on Meta::CPAN
=over 4
=item new( lang => $lang )
=item new( category => $lang )
The constructor of a single instance. An instance will not repeat items
until the list is exhausted.
The C<lang> or C<category> parameter(both are synonymous) should be
expressed as a locale category. If none of those parameters is given
AI::MicroStructure::Locale will try to find the user locale (with the
help of environment variables C<LANGUAGE>, C<LANG> and the module
C<Win32::Locale>).
POSIX locales are defined as C<language[_territory][.codeset][@modifier]>.
If the specific territory is not supported, C<AI::MicroStructure::Locale>
will use the language, and if the language isn't supported either,
the default is used.
=item init()
lib/AI/MicroStructure/Locale.pm view on Meta::CPAN
Return the languages supported by the structure.
=item structure()
Return the structure name.
=back
=head1 SEE ALSO
I<Codes for the Representation of Names of Languages>, at
L<http://www.loc.gov/standards/iso639-2/langcodes.html>.
RFC 3066, I<Tags for the Identification of Languages>, at
L<http://www.ietf.org/rfc/rfc3066.txt>.
L<AI::MicroStructure>, L<Acme::MetaSyntactic::MultiList>.
=head1 AUTHOR
Philippe 'BooK' Bruhat, C<< <book@cpan.org> >>
lib/AI/MicroStructure/MultiList.pm view on Meta::CPAN
sub new {
my $class = shift;
no strict 'refs';
my $self = bless { @_, cache => [] }, $class;
# compute some defaults
$self->{category} ||= ${"$class\::Default"};
# fall back to last resort (FIXME should we carp()?)
$self->{category} = ${"$class\::Default"}
if $self->{category} ne ':all'
&& !exists ${"$class\::MultiList"}{ $self->{category} };
$self->_compute_base();
return $self;
}
sub _compute_base {
my ($self) = @_;
lib/AI/MicroStructure/MultiList.pm view on Meta::CPAN
no strict 'refs';
return ${"$class\::Theme"};
}
1;
__END__
=head1 NAME
AI::MicroStructure::MultiList - Base class for structures with multiple lists
=head1 SYNOPSIS
package AI::MicroStructure::digits;
use AI::MicroStructure::MultiList;
our @ISA = ( AI::MicroStructure::MultiList );
__PACKAGE__->init();
1;
=head1 NAME
lib/AI/MicroStructure/MultiList.pm view on Meta::CPAN
three five seven
# names composites even
four six eight
# names composites odd
nine
# names other
zero one
=head1 DESCRIPTION
C<AI::MicroStructure::MultiList> is the base class for all structures
that are meant to return a random excerpt from a predefined list
I<divided in categories>.
The category is selected at construction time from:
=over 4
=item 1.
the given C<category> parameter,
lib/AI/MicroStructure/RemoteList.pm view on Meta::CPAN
foreach my $src (@srcs) {
my $request = HTTP::Request->new(
ref $src
? ( POST => $src->[0],
[ content_type => 'application/x-www-form-urlencoded' ],
$src->[1]
)
: ( GET => $src )
);
my $res = $ua->request( $request );
if ( ! $res->is_success() ) {
carp "Failed to get content at $src (" . $res->status_line();
return;
}
# extract, cleanup and return the data
# if decoding the content fails, we just deal with the raw content
push @items =>
$class->extract( $res->decoded_content() || $res->content(),
$category || () );
}
# return unique items
my %seen;
return grep { !$seen{$_}++ } @items;
}
#
lib/AI/MicroStructure/RemoteList.pm view on Meta::CPAN
);
__PACKAGE__->init();
1;
# and the usual documentation and list definition
=head1 DESCRIPTION
This base class adds the capability to fetch a fresh list of items from a
remote source to any structure that requires it.
To be able to fetch remote items, an C<AI::MicroStructure> structure must
define the package hash variable C<%Remote> with the appropriate keys.
The keys are:
=over 4
=item C<source>
lib/AI/MicroStructure/RemoteList.pm view on Meta::CPAN
support several cases:
Single source URL:
source => $url
Multiple source URL:
source => [ $url1, $url2, ... ]
For structures with categories, it's possible to attach a URL for each
category:
source => {
category1 => $url1,
category2 => $url2,
...
}
In the case where the C<source> is an array or a hash reference, an
extra case is supported, in case the source data can only be obtained
lib/AI/MicroStructure/RemoteList.pm view on Meta::CPAN
must be used, then it must be provided as a list of a single item:
source => [ [ $url => $data ] ]
=item C<extract>
A reference to a subroutine that extracts a list of items from a string.
The string is meant to be the content available at the URL stored in
the C<source> key.
The coderef may receive an optional parameter corresponding to the name of
the category (useful if the coderef must behave differently depending on
the category).
=back
C<LWP::Simple> is used to download the remote data.
All existing C<AI::MicroStructure> behaviours
(C<AI::MicroStructure::List> and C<AI::MicroStructure::Locale> are
subclasses of C<AI::MicroStructure::RemoteList>.
lib/AI/MicroStructure/RemoteList.pm view on Meta::CPAN
=item has_remotelist()
Return a boolean indicating if the C<source> key is defined (and therefore
if the structure actually has a remote list).
=item source()
Return the data structure containing the source URLs. This can be quite
different depending on the class: a single scalar (URL), an array
reference (list of URLs) or a hash reference (each value being either
a scalar or an array reference) for structures that are subclasses of
C<AI::MicroStructure::MultiList>.
=item sources( [ $category ] )
Return the list of source URL. The C<$category> parameter can be used
to select the sources for a sub-category of the structure (in the case of
C<AI::MicroStructure::MultiList>).
C<$category> can be an array reference containing a list of categories.
lib/AI/MicroStructure/RemoteList.pm view on Meta::CPAN
=head1 TRANSFORMATION SUBROUTINES
The C<AI::MicroStructure::RemoteList> class also provides a few helper
subroutines that simplify the normalisation of items:
=over 4
=item tr_nonword( $str )
Return a copy of C<$str> with all non-word characters turned into
underscores (C<_>).
=item tr_accent( $str )
Return a copy of C<$str> will all iso-8859-1 accented characters turned
into basic ASCII characters.
=item tr_utf8_basic( $str )
Return a copy of C<$str> with some of the utf-8 accented characters turned
into basic ASCII characters. This is very crude, but I didn't to bother
lib/AI/MicroStructure/Util.pm view on Meta::CPAN
}
if($config->{default}) {
shift @CWD;
push @CWD, $config->{default};
if (-e "$CWD[0]/.micro") {
my $c = Config::Auto::parse("$CWD[0]/.micro");
foreach (keys %{$config}) { $c->{$_} ||= $config->{$_}; }
$config = $c;
}
}
my $structdir = "structures";
my $path = {
"structures" => $structdir,
"cwd/structures" => "$CWD[0]/$structdir",
};
return { "cwd" => @CWD, "path" => $path, "cfg" => $config };
}
sub config {
my $state = AI::MicroStructure::Util::load_config(); my @CWD = $state->{cwd};
lib/AI/MicroStructure/WordBlacklist.pm view on Meta::CPAN
use strict;
use warnings;
use Exporter;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = ( 'all' => [ qw( getStopWords ) ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
sub getStopWordsSmall{
my @search = ("a","a's","able","about","above","according","accordingly","across","actually","after","afterwards","again","against","ain't","all","allow","allows","almost","alone","along","already","also","although","always","am","among","amongst","a...
return @search;
}
sub getStopWords {
if ( @_ and $_[0] eq 'UTF-8' ) {
# adding U0 causes the result to be flagged as UTF-8
my %stoplist = map { ( pack("U0a*", $_), 1 ) } qw(
a able about above according accordingly across actually after afterwards again against aint all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywhere a...
b be became because become becomes becoming been before beforehand behind being believe below beside besides best better between beyond both brief but by
c came can cannot cant cant cause causes certain certainly changes clearly cmon co com come comes concerning consequently consider considering contain containing contains corresponding could couldnt course cs currently
d definitely described despite did didnt different do does doesnt doing done dont down downwards during
e each edu eg eight either else elsewhere enough entirely especially et etc even ever every everybody everyone everything everywhere ex exactly example except
f far few fifth first five followed following follows for former formerly forth four from further furthermore
g get gets getting given gives go goes going gone got gotten greetings
h had hadnt happens hardly has hasnt have havent having he hello help hence her here hereafter hereby herein heres hereupon hers herself hes hi him himself his hither hopefully how howbeit however
i id ie if ignored ill im immediate in inasmuch inc indeed indicate indicated indicates inner insofar instead into inward is isnt it itd itll its its itself ive
j just k keep keeps kept know known knows
l last lately later latter latterly least less lest let lets like liked likely little look looking looks ltd
m mainly many may maybe me mean meanwhile merely might more moreover most mostly much must my myself
n name namely nd near nearly necessary need needs neither never nevertheless new next nine no nobody non none noone nor normally not nothing novel now nowhere
o obviously of off often oh ok okay old on once one ones only onto or other others otherwise ought our ours ourselves out outside over overall own
p particular particularly per perhaps placed please plus possible presumably probably provides
q que quite qv r rather rd re really reasonably regarding regardless regards relatively respectively right
s said same saw say saying says second secondly see seeing seem seemed seeming seems seen self selves sensible sent serious seriously seven several shall she should shouldnt since six so some somebody somehow someone something sometime sometimes some...
t take taken tell tends th than thank thanks thanx that thats thats the their theirs them themselves then thence there thereafter thereby therefore therein theres theres thereupon these they theyd theyll theyre theyve think third this thorough thorou...
u un under unfortunately unless unlikely until unto up upon us use used useful uses using usually uucp
v value various very via viz vs
w want wants was wasnt way we wed welcome well well went were were werent weve what whatever whats when whence whenever where whereafter whereas whereby wherein wheres whereupon wherever whether which while whither who whoever whole whom whos whose w...
x
y yes yet you youd youll your youre yours yourself yourselves youve
z zero
air anr arm cke ckg ckl duo ged gie hie ihk las len lie llt los lte max mmt mvv opa rer rkt sap spr str ung utf zoo zuf zuh abo awo bef beh bmw cks daf del ern geh gen hne hof hrl lle lze mer nau ner ost pfe ppg pur rde rin rke sen tee tvf uni vri wu...
i me my myself we our ours ourselves you your yours yourself
yourselves he him his himself she her hers herself it its
itself they them their theirs themselves what which who whom
this that these those am is are was were be been being have has
had having do does did doing would should could ought i'm
you're he's she's it's we're they're i've you've we've they've
lib/AI/MicroStructure/WordBlacklist.pm view on Meta::CPAN
no nor not only own same so than too very a a's able about above
according accordingly across actually after afterwards again against
ain't all allow allows almost alone along already also although always
am among amongst an and another any anybody anyhow anyone anything
anyway anyways anywhere apart appear appreciate appropriate are aren't
around as aside ask asking associated at available away awfully b be
became because become becomes becoming been before beforehand behind
being believe below beside besides best better between beyond both brief
but by c c'mon c's came can can't cannot cant cause causes certain
certainly changes clearly co com come comes concerning consequently
consider considering contain containing contains corresponding could
couldn't course currently d definitely described despite did didn't
different do does doesn't doing don't done down downwards during e each
edu eg eight either else elsewhere enough entirely especially et etc
even ever every everybody everyone everything everywhere ex exactly
example except f far few fifth first five followed following follows
for former formerly forth four from further furthermore g get gets
getting given gives go goes going gone got gotten greetings h had
hadn't happens hardly has hasn't have haven't having he he's hello
help hence her here here's hereafter hereby herein hereupon hers
herself hi him himself his hither hopefully how howbeit however
lib/AI/MicroStructure/WordBlacklist.pm view on Meta::CPAN
indicate indicated indicates inner insofar instead into inward is
isn't it it'd it'll it's its itself j just k keep keeps kept know
knows known l last lately later latter latterly least less lest let
let's like liked likely little look looking looks ltd m mainly many
may maybe me mean meanwhile merely might more moreover most
mostly much must my myself n name namely nd near nearly necessary
need needs neither never nevertheless new next nine no nobody non
none noone nor normally not nothing novel now nowhere o obviously of
off often oh ok okay old on once one ones only onto or other others otherwise ought
our ours ourselves out outside over overall own
p particular particularly per perhaps placed please plus possible presumably probably
provides q que quite qv r rather rd re really reasonably regarding regardless regards
relatively respectively right s said same saw say saying says second secondly see seeing seem seemed seeming seems seen self selves sensible sent serious seriously seven
several shall she should shouldn't since six
so some somebody somehow someone something sometime sometimes somewhat somewhere soon sorry specified specify specifying still sub such sup sure t t's take taken tell tends th than thank thanks thanx that that's thats the their theirs them themselves...
qqq rrr sss ttt uuu vvv www xxx yyy zzz .... unsere ihrer uns wurde wer gegen diesem bis nur wieder unserem einer war man bei wir einen vom einem unter jeder werden wie als durch zum hat vor unseres email bel ihnen unseren bzw lieber uft kommen nicht...
anderweitigen anderweitiger anderweitiges anerkannt anerkannte anerkannter anerkanntes anfangen anfing angefangen angesetze angesetzt angesetzten angesetzter ans anscheinend ansetzen ansonst ansonsten anstatt anstelle arbeiten auch auf aufgehört aufg...
bessere besserem besseren besserer besseres bestehen besteht bestenfalls bestimmt bestimmte bestimmtem bestimmten bestimmter bestimmtes betraechtlich betraechtliche betraechtlichem betraechtlichen betraechtlicher betraechtliches betreffend betreffend...
diesseitiges diesseits dinge dir direkt direkte direkten direkter doch doppelt dort dorther dorthin dran drauf drei dreißig drin dritte drueber drum drunter drüber du dunklen durch durchaus durchweg durchwegs durfte durften dürfen dürfte eben ebenfal...
entsprechender entsprechendes entweder er ergo ergänze ergänzen ergänzte ergänzten erhalten erhielt erhielten erhält erneut erst erste erstem ersten erster erstere ersterem ersteren ersterer ersteres erstes eröffne eröffnen eröffnet eröffnete eröffne...
häufige häufigem häufigen häufiger häufigere häufigeren häufigerer häufigeres höchst höchstens ich igitt ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres ihretwegen im immer immerhin immerwaehrend immerwaehrende immerwaehrendem immerwaehrenden immerwae...
jeglichen jeglicher jegliches jemals jemand jene jenem jenen jener jenes jenseitig jenseitigem jenseitiger jenseits jetzt jährig jährige jährigem jährigen jähriges kaeumlich kam kann kannst kaum kein keine keinem keinen keiner keinerlei keines keines...
naechste naemlich nahm naturgemaess naturgemaeß naturgemäss naturgemäß natürlich neben nebenan nehmen nein neu neue neuem neuen neuer neuerdings neuerlich neuerliche neuerlichem neuerlicher neuerliches neues neulich neun nicht nichts nichtsdestotrotz...
seine seinem seinen seiner seines seit seitdem seite seiten seither selbe selben selber selbst selbstredend selbstredende selbstredendem selbstredenden selbstredender selbstredendes seltsamerweise senke senken senkt senkte senkten setzen setzt setzte...
unmaßgeblichem unmaßgeblichen unmaßgeblicher unmaßgebliches unmoeglich unmoegliche unmoeglichem unmoeglichen unmoeglicher unmoegliches unmöglich unmögliche unmöglichen unmöglicher unnötig uns unsaeglich unsaegliche unsaeglichem unsaeglichen unsaeglic...
vollends vollstaendig vollstaendige vollstaendigem vollstaendigen vollstaendiger vollstaendiges vollständig vollständige vollständigem vollständigen vollständiger vollständiges vom von vor voran vorbei vorgestern vorher vorherig vorherige vorherigem ...
würde würden während währenddessen wär wäre wären x übel über überall überallhin überaus überdies überhaupt übermorgen üblicherweise übrig übrigens z.B. zahlreich zahlreichem zahlreicher zB zb. zehn zeitweise zeitweisem zeitweisen zeitweiser ziehen z...
return \%stoplist;
}
else {
my %stoplist = map { ( $_, 1 ) } qw(
a able about above according accordingly across actually after afterwards again against aint all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywhere a...
b be became because become becomes becoming been before beforehand behind being believe below beside besides best better between beyond both brief but by
c came can cannot cant cant cause causes certain certainly changes clearly cmon co com come comes concerning consequently consider considering contain containing contains corresponding could couldnt course cs currently
d definitely described despite did didnt different do does doesnt doing done dont down downwards during
e each edu eg eight either else elsewhere enough entirely especially et etc even ever every everybody everyone everything everywhere ex exactly example except
f far few fifth first five followed following follows for former formerly forth four from further furthermore
g get gets getting given gives go goes going gone got gotten greetings
h had hadnt happens hardly has hasnt have havent having he hello help hence her here hereafter hereby herein heres hereupon hers herself hes hi him himself his hither hopefully how howbeit however
i id ie if ignored ill im immediate in inasmuch inc indeed indicate indicated indicates inner insofar instead into inward is isnt it itd itll its its itself ive
j just k keep keeps kept know known knows
l last lately later latter latterly least less lest let lets like liked likely little look looking looks ltd
m mainly many may maybe me mean meanwhile merely might more moreover most mostly much must my myself
n name namely nd near nearly necessary need needs neither never nevertheless new next nine no nobody non none noone nor normally not nothing novel now nowhere
o obviously of off often oh ok okay old on once one ones only onto or other others otherwise ought our ours ourselves out outside over overall own
p particular particularly per perhaps placed please plus possible presumably probably provides
q que quite qv r rather rd re really reasonably regarding regardless regards relatively respectively right
s said same saw say saying says second secondly see seeing seem seemed seeming seems seen self selves sensible sent serious seriously seven several shall she should shouldnt since six so some somebody somehow someone something sometime sometimes some...
t take taken tell tends th than thank thanks thanx that thats thats the their theirs them themselves then thence there thereafter thereby therefore therein theres theres thereupon these they theyd theyll theyre theyve think third this thorough thorou...
u un under unfortunately unless unlikely until unto up upon us use used useful uses using usually uucp
v value various very via viz vs
w want wants was wasnt way we wed welcome well well went were were werent weve what whatever whats when whence whenever where whereafter whereas whereby wherein wheres whereupon wherever whether which while whither who whoever whole whom whos whose w...
x
y yes yet you youd youll your youre yours yourself yourselves youve
z zero
i me my myself we our ours ourselves you your yours yourself
yourselves he him his himself she her hers herself it its
itself they them their theirs themselves what which who whom
this that these those am is are was were be been being have has
had having do does did doing would should could ought i'm
you're he's she's it's we're they're i've you've we've they've
i'd you'd he'd she'd we'd they'd i'll you'll he'll she'll we'll
they'll isn't aren't wasn't weren't hasn't haven't hadn't
doesn't don't didn't won't wouldn't shan't shouldn't can't
cannot couldn't mustn't let's that's who's what's here's
there's when's where's why's how's a an the and but if or
because as until while of at by for with about against between
into through during before after above below to from up down in
out on off over under again further then once here there when
where why how all any both each few more most other some such
no nor not only own same so than too very
a a's able about above according accordingly across actually after afterwards again against ain't all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywh...
qqq rrr sss ttt uuu vvv www xxx yyy zzz .... unsere ihrer uns wurde wer gegen diesem bis nur wieder unserem einer war man bei wir einen vom einem unter jeder werden wie als durch zum hat vor unseres email bel ihnen unseren bzw lieber uft kommen nicht...
anderweitigen anderweitiger anderweitiges anerkannt anerkannte anerkannter anerkanntes anfangen anfing angefangen angesetze angesetzt angesetzten angesetzter ans anscheinend ansetzen ansonst ansonsten anstatt anstelle arbeiten auch auf aufgehört aufg...
bessere besserem besseren besserer besseres bestehen besteht bestenfalls bestimmt bestimmte bestimmtem bestimmten bestimmter bestimmtes betraechtlich betraechtliche betraechtlichem betraechtlichen betraechtlicher betraechtliches betreffend betreffend...
diesseitiges diesseits dinge dir direkt direkte direkten direkter doch doppelt dort dorther dorthin dran drauf drei dreißig drin dritte drueber drum drunter drüber du dunklen durch durchaus durchweg durchwegs durfte durften dürfen dürfte eben ebenfal...
entsprechender entsprechendes entweder er ergo ergänze ergänzen ergänzte ergänzten erhalten erhielt erhielten erhält erneut erst erste erstem ersten erster erstere ersterem ersteren ersterer ersteres erstes eröffne eröffnen eröffnet eröffnete eröffne...
häufige häufigem häufigen häufiger häufigere häufigeren häufigerer häufigeres höchst höchstens ich igitt ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres ihretwegen im immer immerhin immerwaehrend immerwaehrende immerwaehrendem immerwaehrenden immerwae...
jeglichen jeglicher jegliches jemals jemand jene jenem jenen jener jenes jenseitig jenseitigem jenseitiger jenseits jetzt jährig jährige jährigem jährigen jähriges kaeumlich kam kann kannst kaum kein keine keinem keinen keiner keinerlei keines keines...
naechste naemlich nahm naturgemaess naturgemaeß naturgemäss naturgemäß natürlich neben nebenan nehmen nein neu neue neuem neuen neuer neuerdings neuerlich neuerliche neuerlichem neuerlicher neuerliches neues neulich neun nicht nichts nichtsdestotrotz...
seine seinem seinen seiner seines seit seitdem seite seiten seither selbe selben selber selbst selbstredend selbstredende selbstredendem selbstredenden selbstredender selbstredendes seltsamerweise senke senken senkt senkte senkten setzen setzt setzte...
unmaßgeblichem unmaßgeblichen unmaßgeblicher unmaßgebliches unmoeglich unmoegliche unmoeglichem unmoeglichen unmoeglicher unmoegliches unmöglich unmögliche unmöglichen unmöglicher unnötig uns unsaeglich unsaegliche unsaeglichem unsaeglichen unsaeglic...
vollends vollstaendig vollstaendige vollstaendigem vollstaendigen vollstaendiger vollstaendiges vollständig vollständige vollständigem vollständigen vollständiger vollständiges vom von vor voran vorbei vorgestern vorher vorherig vorherige vorherigem ...
würde würden während währenddessen wär wäre wären x übel über überall überallhin überaus überdies überhaupt übermorgen üblicherweise übrig übrigens z.B. zahlreich zahlreichem zahlreicher zB zb. zehn zeitweise zeitweisem zeitweisen zeitweiser ziehen z...
return \%stoplist;
}
}
1;
lib/AI/MicroStructure/WordBlacklist.pm view on Meta::CPAN
AI::MicroStructure::WordBlacklist
=head1 DESCRIPTION
Creates Concepts for words
=head1 SYNOPSIS
~$ micro new world
~$ micro structures
~$ micro any 2
~$ micro drop world
~$ micro
=head1 AUTHOR
Hagen Geissler <santex@cpan.org>
lib/AI/MicroStructure/any.pm view on Meta::CPAN
# export the metaany function
my $callpkg = caller;
my $meta = AI::MicroStructure::any->new();
no strict 'refs';
*{"$callpkg\::metaany"} = sub { $meta->name( @_ ) };
}
sub name {
my $self = shift;
my $structure =
( shuffle( grep { !/^(?:any|random)$/ } AI::MicroStructure->structures() ) )[0];
$self->{meta}->name( $structure, @_ );
}
sub new {
my $class = shift;
# we need a full AI::MicroStructure object, to support AMS::Locale
return bless { meta => AI::MicroStructure->new( @_ ) }, $class;
}
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
AI::MicroStructure::germany - The numbers structure
=head1 DESCRIPTION
You can count on this module. Almost.
=cut
__DATA__
# default
Dresden
# names Dresden
01067 01069 01097 01099 01108 01109 01127 01129 01139 01156 01157 01159 01169 01187 01189 01217 01219 01237 01239 01257 01259 01277 01279 01307 01309 01324 01326 01328 01462 01465 01478
# names Radebeul
01445
# names Radeberg
01454
# names Wachau
01454
# names Ottendorf-Okrilla
01458
# names Moritzburg
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Frankenthal
01909
# names Kamenz
01917
# names Crostwitz
01920
# names Panschwitz-Kuckau
01920
# names Steina
01920
# names Dresden 01067 01069 01097 01099 01108 01109 01127 01129 01139 01156 01157 01159 01169 01187 01189 01217 01219 01237 01239 01257 01259 01277 01279 01307 01309 01324 01326 01328 01462 01465 01478
# names Radebeul 01445
# names Radeberg 01454
# names Wachau 01454
# names Ottendorf-Okrilla 01458
# names Moritzburg 01468
# names Radeburg 01471
# names Arnsdorf 01477
# names Lampertswalde 01561
# names Tauscha 01561
# names Priestewitz 01561
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Wildberg 04916 17091 72218
# names Werchau 04916
# names Kahla 04928 07768
# names Schraden 04928
# names Plessa 04928
# names Wainsdorf 04932
# names Saathain 04932
# names Hirschfeld 04932 07554 08107 08144 55483
# names Reichenhain 04932
# names Merzdorf 04932
# names Dreska 04934
# names Hohenleipisch 04934
# names Schlieben 04936
# names Hohenbucko 04936
# names Jagsal 04936
# names Stechau 04936
# names Kolochau 04936
# names Malitschkendorf 04936
# names Wehrhain 04936
# names Frankenhain 04936 99330
# names Hillmersdorf 04936
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Kleinmachnow 14532
# names Fahlhorst 14532
# names Schwielowsee 14542 14548
# names Werder 15345 17089 19386
# names Beelitz 14547 39596
# names Krielow 14550
# names Derwitz 14550
# names Bochow 14550
# names Schmergow 14550
# names Deetz 14550 39264
# names Fresdorf 14552
# names Michendorf 14552
# names Wildenbruch 14552
# names Saarmund 14552
# names Tremsdorf 14552
# names Langerwisch 14557
# names Wilhelmshorst 14557
# names Falkensee 14612
# names Paulinenaue 14641
# names Wustermark 14641
# names Tremmen 14641
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Putgarten 18556
# names Altenkirchen 18556 57610 66903
# names Wiek 18556
# names Breege 18556
# names Insel 39599
# names Schaprode 18569
# names Gingst 18569
# names Ummanz 18569
# names Trent 18569
# names Kluis 18569
# names Dreschvitz 18573
# names Rambin 18573
# names Samtens 18573
# names Poseritz 18574
# names Gustow 18574
# names Karnitz 18574
# names Zudar 18574
# names Putbus 18581
# names Middelhagen 18586
# names Thiessow 18586
# names Baabe 18586
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Utecht 19217
# names Carlow 19217
# names Kuhstorf 19230
# names Moraas 19230
# names Picher 19230
# names Belsch 19230
# names Bandenitz 19230
# names Hoort 19230
# names Pritzier 19230
# names Bobzin 19230
# names Bresegard 19230 19294
# names Hagenow 19230
# names Setzin 19230
# names Warlitz 19230
# names Strohkirchen 19230
# names Redefin 19230
# names Gammelin 19230
# names Toddin 19230
# names Parum 19243
# names Luckwitz 19243
# names Karft 19243
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Lehsen 19243
# names Valluhn 19246
# names Neuhof 19246 31195 36119
# names Zarrentin 19246
# names Camin 19246
# names Lassahn 19246
# names Bantin 19246
# names Jessenitz 19249
# names Garlitz 19249
# names Boizenburg 19258
# names Gresse 19258
# names Wiebendorf 19258
# names Schwanheide 19258
# names Tessin 18195
# names Boizenburg 19258
# names Nostorf 19258
# names Gallin 19258
# names Greven 19258 48268
# names Besitz 19258
# names Vellahn 19260
# names Rodenwalde 19260
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Handeloh 21256
# names Otter 21259
# names Welle 21261
# names Jesteburg 21266
# names Asendorf 21271 27330
# names Hanstedt 21271
# names Egestorf 21272
# names Undeloh 21274
# names Wenzendorf 21279
# names Hollenstedt 21279
# names Drestedt 21279
# names Appel 21279
# names Bleckede 21354
# names Barum 21357 29576
# names Wittorf 21357
# names Bardowick 21357
# names Mechtersen 21358
# names Adendorf 21365
# names Dahlenburg 21368
# names Dahlem 21368 53949 54636
# names Boitze 21368
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Horneburg 21640
# names Apensen 21641
# names Beckdorf 21643
# names Sauensiek 21644
# names Halvesbostel 21646
# names Moisburg 21647
# names Regesbostel 21649
# names Stade 21680 21682 21683 21684
# names Agathenburg 21684
# names Harsefeld 21698
# names Brest 21698
# names Bargstedt 21698 24793
# names Ahlerstedt 21702
# names Drochtersen 21706
# names Burweg 21709
# names Himmelpforten 21709
# names Engelschoff 21710
# names Hammah 21714
# names Deinste 21717
# names Fredenbeck 21717
# names Steinkirchen 21720 84439
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Dingen 25715
# names Friedrichskoog 25718
# names Busenwurth 25719
# names Barlt 25719
# names Eggstedt 25721
# names Neufeld 25724
# names Neufelderkoog 25724
# names Schmedeswurth 25724
# names Schafstedt 25725
# names Bornholt 25725
# names Frestedt 25727
# names Krumstedt 25727
# names Windbergen 25729
# names Ostrohe 25746
# names Lohe-Rickelshof 25746
# names Heide 25746
# names Wesseln 25746
# names Hedwigenkoog 25761
# names Oesterdeichstrich 25761
# names Warwerort 25761
# names Westerdeichstrich 25761
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Goldelund 25862
# names Joldelund 25862
# names Mildstedt 25866
# names Norderstapel 25868
# names Norderfriedrichskoog 25870
# names Oldenswort 25870
# names Wittbek 25872
# names Oldersbek 25873
# names Rantrum 25873
# names Ramstedt 25876
# names Fresendelf 25876
# names Schwabstedt 25876
# names Hude 25876 49448
# names Seeth 25878
# names Augustenkoog 25881
# names Westerhever 25881
# names Tating 25881
# names Sollwitt 25884
# names Norstedt 25884
# names Immenstedt 25885
# names Oster-Ohrstedt 25885
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Jameln 29479
# names Karwitz 29481
# names Lemgow 29485
# names Prezelle 29491
# names Schnackenburg 29493
# names Trebel 29494
# names Waddeweitz 29496
# names Zernien 29499
# names Uelzen 29525
# names Suderburg 29556
# names Wrestedt 29559
# names Suhlendorf 29562
# names Wriedel 29565
# names Wieren 29568
# names Rosche 29571
# names Ebstorf 29574
# names Altenmedingen 29575
# names Eimke 29578
# names Emmendorf 29579
# names Gerdau 29581
# names Hanstedt 21271
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Veckenstedt 38871
# names Stapelburg 38871
# names Ilsenburg 38871
# names Darlingerode 38871
# names Abbenrode 38871
# names Tanne 38875
# names Sorge 38875
# names Elend 38875
# names Benneckenstein 38877
# names Schierke 38879
# names Treseburg 38889
# names Heimburg 38889
# names Wienrode 38889
# names Cattenstedt 38889
# names Blankenburg 38889 99955
# names Altenbrak 38889
# names Langenstein 38895
# names Derenburg 38895
# names Trautenstein 38899
# names Stiege 38899
# names Hasselfelde 38899
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Schweinitz 39279
# names Rosian 39279
# names Ladeburg 39279
# names Hobeck 39279
# names Zeppernick 39279
# names Loburg 39279
# names Leitzkau 39279
# names Burg 39288 54646
# names Vehlitz 39291
# names Tryppehna 39291
# names Stresow 39291
# names Stegelitz 39291
# names Schopsdorf 39291
# names Schermen 39291
# names Schartau 39291
# names Rietzel 39291
# names Karith 39291
# names Ihleburg 39291
# names Hohenziatz 39291
# names Hohenwarthe 39291
# names Ziepel 39291
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Emstek 49685
# names Lastrup 49688
# names Molbergen 49696
# names Meppen 49716
# names Haren 49733
# names Geeste 49744
# names Werpeloh 49751
# names Vrees 49757
# names Werlte 49757
# names Lahn 49757
# names Fresenburg 49762
# names Sustrum 49762
# names Renkenberge 49762
# names Lathen 49762
# names Twist 49767
# names Herzlake 49770
# names Stavern 49777
# names Niederlangen 49779
# names Oberlangen 49779
# names Lingen 49808 49809 49811
# names Ringe 49824
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Salm 54570
# names Hinterweiler 54570
# names Densborn 54570
# names Weidenbach 54570 56355 91746
# names Betteldorf 54570
# names Deudesfeld 54570
# names Meisburg 54570
# names Schutz 54570
# names Oberstadtfeld 54570
# names Kopp 54574
# names Birresborn 54574
# names Hillesheim 54576 67586
# names Dohm-Lammersdorf 54576
# names Oberbettingen 54578
# names Berndorf 54578
# names Walsdorf 54578 96194
# names Basberg 54578
# names Nohn 54578
# names Wiesbaum 54578
# names Oberehe-Stroheich 54578
# names Feusdorf 54584
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Anschau 56729
# names Siebenbach 56729
# names Virneburg 56729
# names Monreal 56729
# names Luxem 56729
# names Hirten 56729
# names Ditscheid 56729
# names Langscheid 56729
# names Nachtsheim 56729
# names Nitz 56729
# names Herresbach 56729
# names Kehrig 56729
# names Baar 56729 86672
# names Welschenbach 56729
# names Kirchwald 56729
# names Kottenheim 56736
# names Mendig 56743
# names Weibern 56745
# names Hausten 56745
# names Rieden 56745 87668 92286
# names Volkesfeld 56745
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Deggingen 73326
# names Kuchen 73329
# names Amstetten 73340
# names Gruibingen 73344
# names Hohenstadt 73345
# names Drackenstein 73345
# names Wiesensteig 73349
# names Aalen 73430 73431 73432 73433 73434
# names Bopfingen 73441
# names Oberkochen 73447
# names Neresheim 73450
# names Essingen 73457 76879
# names Westhausen 73463 98663 99869
# names Lauchheim 73466
# names Kirchheim 36275 97268 99334
# names Unterschneidheim 73485
# names Adelmannsfelden 73486
# names Jagstzell 73489
# names Neuler 73491
# names Rainau 73492
# names Rosenberg 73494 74749
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Seebach 77889 99846
# names Ettenheim 77955
# names Schwanau 77963
# names Kappel-Grafenhausen 77966
# names Kippenheim 77971
# names Mahlberg 77972
# names Ringsheim 77975
# names Rust 77977
# names Schuttertal 77978
# names Villingen-Schwenningen 78048 78050 78052 78054 78056
# names Niedereschach 78078
# names Dauchingen 78083
# names Brigachtal 78086
# names Unterkirnach 78089
# names Triberg 78098
# names Hornberg 78132
# names Tennenbronn 78144
# names Donaueschingen 78166
# names Geisingen 78187
# names Immendingen 78194
# names Singen 78224
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Rehling 86508
# names Ried 86510
# names Schmiechen 86511
# names Ursberg 86513
# names Ustersbach 86514
# names Wehringen 86517
# names Schrobenhausen 86529
# names Aichach 86551
# names Hohenwart 86558
# names Adelzhausen 86559
# names Aresing 86561
# names Berg 53505 56357 82335 88276 95180
# names Brunnen 86564
# names Gachenbach 86565
# names Hilgertshausen-Tandern 86567
# names Hollenbach 86568
# names Inchenhofen 86570
# names Langenmosen 86571
# names Obergriesbach 86573
# names Schiltberg 86576
# names Sielenbach 86577
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Oberostendorf 86869
# names Rammingen 86871 89192
# names Scherstetten 86872
# names Tussenhausen 86874
# names Waal 86875
# names Walkertshofen 86877
# names Wiedergeltingen 86879
# names Landsberg 06188
# names Kaufering 86916
# names Denklingen 86920
# names Eresing 86922
# names Finning 86923
# names Fuchstal 86925
# names Greifenberg 86926
# names Penzing 86929
# names Prittriching 86931
# names Reichling 86934
# names Scheuring 86937
# names Schondorf 07924 54316
# names Schwifting 86940
# names Thaining 86943
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Weiding 92557 93495
# names Winklarn 92559
# names Theisseil 92637
# names Neustadt 37345
# names Kirchendemenreuth 92665
# names Altenstadt 63674 86972 89281
# names Windischeschenbach 92670
# names Eschenbach 73107
# names Speinshart 92676
# names Erbendorf 92681
# names Pressath 92690
# names Eslarn 92693
# names Etzenricht 92694
# names Georgenberg 92697
# names Irchenrieth 92699
# names Bechtsrieth 92699
# names Krummennaab 92703
# names Leuchtenberg 92705
# names Luhe-Wildenau 92706
# names Mantel 92708
# names Moosbach 92709
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Helmbrechts 95233
# names Sparneck 95234
# names Stammbach 95236
# names Kulmbach 95326
# names Mainleus 95336
# names Wirsberg 95339
# names Neuenmarkt 95339
# names Stadtsteinach 95346
# names Thurnau 95349
# names Marktleugast 95352
# names Presseck 95355
# names Grafengehaig 95356
# names Guttenberg 95358
# names Kasendorf 95359
# names Kupferberg 95362
# names Ludwigschorgast 95364
# names Rugendorf 95365
# names Trebgast 95367
# names Untersteinach 95369
# names Bayreuth 95444 95445 95447 95448
# names Bindlach 95463
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Weismain 96260
# names Altenkunstadt 96264
# names Mitwitz 96268
# names Forst 57537 76694
# names Hochstadt 76879
# names Itzgrund 96274
# names Marktzeuln 96275
# names Schneckenlohe 96277
# names Coburg 96450
# names Kronach 96317
# names Pressig 96332
# names Ludwigsstadt 96337
# names Stockheim 96342 97640
# names Wallenfels 96346
# names Steinwiesen 96349
# names Wilhelmsthal 96352
# names Teuschnitz 96358
# names Steinbach 36448 37308 56291
# names Wald 87616 88639 93192
# names Marktrodach 96364
# names Nordhalben 96365
lib/AI/MicroStructure/germany.pm view on Meta::CPAN
# names Grafenrheinfeld 97506
# names Grettstadt 97508
# names Kolitzheim 97509
# names Oberaurach 97514
# names Oberschwarzach 97516
# names Rannungen 97517
# names Riedbach 97519
# names Schwanfeld 97523
# names Schwebheim 97525
# names Sennfeld 97526
# names Theres 97531
# names Waigolshausen 97534
# names Wasserlosen 97535
# names Wipfeld 97537
# names Wonfurt 97539
# names Neustadt 37345
# names Heustreu 97618
# names Hohenroth 97618
# names Unsleben 97618
# names Strahlungen 97618
# names Hollstadt 97618
t/canned/docs/antimatter.pm view on Meta::CPAN
#!/usr/bin/perl -W
package AI::MicroStructure::antimatter;
use strict;
use AI::MicroStructure::List;
our @ISA = qw( AI::MicroStructure::List );
our @List = qw( @{$structures{$structure}} );
__PACKAGE__->init();
1;
__DATA__
# names
antimatter
entity
matter
physical_entity
t/canned/docs/atom.pm view on Meta::CPAN
#!/usr/bin/perl -W
package AI::MicroStructure::atom;
use strict;
use AI::MicroStructure::List;
our @ISA = qw( AI::MicroStructure::List );
our @List = qw( @{$structures{$structure}} );
__PACKAGE__->init();
1;
__DATA__
# names
abstract_entity
abstraction
atom
carbon_atom
component