diff options
author | René Scheibe <rene.scheibe@gmail.com> | 2014-09-25 16:27:12 +0200 |
---|---|---|
committer | René Scheibe <rene.scheibe@gmail.com> | 2014-09-29 10:37:21 +0200 |
commit | 23fb9006bcf72301f3f4ecd5424732d33c353413 (patch) | |
tree | 0290f702c17dcb443011ac1878727117ea2bd188 | |
parent | 710e4567db763a97319fa79d6093d3fc19a80c23 (diff) | |
download | ninka-23fb9006bcf72301f3f4ecd5424732d33c353413.tar.gz |
add perldoc
-rwxr-xr-x | bin/ninka | 29 | ||||
-rw-r--r-- | lib/Ninka.pm | 38 | ||||
-rw-r--r-- | lib/Ninka/CommentExtractor.pm | 53 | ||||
-rw-r--r-- | lib/Ninka/LicenseMatcher.pm | 52 | ||||
-rw-r--r-- | lib/Ninka/SentenceExtractor.pm | 74 | ||||
-rw-r--r-- | lib/Ninka/SentenceFilter.pm | 53 | ||||
-rw-r--r-- | lib/Ninka/SentenceTokenizer.pm | 52 |
7 files changed, 223 insertions, 128 deletions
@@ -27,3 +27,32 @@ Options: } return %opts; } + +__END__ + +=head1 NAME + +ninka + +=head1 DESCRIPTION + +Scans a file and returns the found licenses. + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +=cut diff --git a/lib/Ninka.pm b/lib/Ninka.pm index 5b6f194..90f47b1 100644 --- a/lib/Ninka.pm +++ b/lib/Ninka.pm @@ -41,3 +41,41 @@ sub process_file { } 1; + +__END__ + +=head1 NAME + +Ninka + +=head1 SYNOPSIS + + use Ninka; + + my $input_file = 'some/path/file_of_interest'; + my $verbose = 0; + + my $license_result = Ninka::process_file($input_file, $verbose); + +=head1 DESCRIPTION + +Scans a file and returns the found licenses. + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +=cut diff --git a/lib/Ninka/CommentExtractor.pm b/lib/Ninka/CommentExtractor.pm index c2f4fea..0dd0776 100644 --- a/lib/Ninka/CommentExtractor.pm +++ b/lib/Ninka/CommentExtractor.pm @@ -1,27 +1,4 @@ package Ninka::CommentExtractor; -# -# Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -# -# extComments.pl -# -# This script extracts comments from source code. -# If no comment extractor is known for a language, then extracts top lines from source. -# use strict; use warnings; @@ -102,3 +79,33 @@ sub execute_command { } 1; + +__END__ + +=head1 NAME + +Ninka::CommentExtractor + +=head1 DESCRIPTION + +Extracts comments from source code. +If no comment extractor is known for a language, then extracts top lines from source. + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +=cut diff --git a/lib/Ninka/LicenseMatcher.pm b/lib/Ninka/LicenseMatcher.pm index 266fd65..2e07a40 100644 --- a/lib/Ninka/LicenseMatcher.pm +++ b/lib/Ninka/LicenseMatcher.pm @@ -1,27 +1,4 @@ package Ninka::LicenseMatcher; -# -# Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -# -# matchter.pl -# -# This script uses a set of license sentence names as input and -# outputs license names corresponds to a rule which match the set. -# use strict; #use warnings; @@ -348,3 +325,32 @@ sub generate_license_result { } 1; + +__END__ + +=head1 NAME + +Ninka::LicenseMatcher + +=head1 DESCRIPTION + +Uses a set of license sentence names as input and outputs license names corresponds to a rule which match the set. + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +=cut diff --git a/lib/Ninka/SentenceExtractor.pm b/lib/Ninka/SentenceExtractor.pm index 2b3d5f3..c0dec2e 100644 --- a/lib/Ninka/SentenceExtractor.pm +++ b/lib/Ninka/SentenceExtractor.pm @@ -1,40 +1,4 @@ package Ninka::SentenceExtractor; -# -#*************************************************************************************************** -# SENTENCE SPLITTER -# Author: Paul Clough {cloughie@dcs.shef.ac.uk} -# - -# This program is originally based on the sentence splitter program -# published by Paul Clough. Version 1.0, available from -# http://ir.shef.ac.uk/cloughie/software.html (splitter.zip) -# The original program is without a license. -# -# It was mostly rewritten. -# His ideas, however, linger in here (and his file of abbreviations) -# -# Modifications to the original by Daniel M German and Y. Manabe, -# which are under the following license: -# -# This patch is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This patch is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this patch. If not, see <http://www.gnu.org/licenses/>. -# - -# -# splitter.pl -# -# This script breaks comments into sentences. -# use strict; use warnings; @@ -283,3 +247,41 @@ sub load_abbreviations { } 1; + +__END__ + +=head1 NAME + +Ninka::SentenceExtractor + +=head1 DESCRIPTION + +Breaks comments into sentences. + +=head1 COPYRIGHT AND LICENSE + +This program is originally based on the sentence splitter program +published by Paul Clough. Version 1.0, available from +http://ir.shef.ac.uk/cloughie/software.html (splitter.zip) +The original program is without a license. + +It was mostly rewritten. +His ideas, however, linger in here (and his file of abbreviations) + +Modifications to the original by Daniel M German and Y. Manabe, +which are under the following license: + +This patch is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This patch is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this patch. If not, see <http://www.gnu.org/licenses/>. + +=cut diff --git a/lib/Ninka/SentenceFilter.pm b/lib/Ninka/SentenceFilter.pm index 11f94ce..36d807c 100644 --- a/lib/Ninka/SentenceFilter.pm +++ b/lib/Ninka/SentenceFilter.pm @@ -1,27 +1,4 @@ package Ninka::SentenceFilter; -# -# Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -# -# filter.pl -# -# This script classifies input sentences into two categories, good sentences and bad sentences. -# A sentence including a critical word (ex. legal term) is regarded as good. -# use strict; use warnings; @@ -93,3 +70,33 @@ sub contains_critical_word { } 1; + +__END__ + +=head1 NAME + +Ninka::SentenceFilter + +=head1 DESCRIPTION + +Classifies input sentences into two categories, good sentences and bad sentences. +A sentence including a critical word (ex. legal term) is regarded as good. + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +=cut diff --git a/lib/Ninka/SentenceTokenizer.pm b/lib/Ninka/SentenceTokenizer.pm index b38d6f8..3a391da 100644 --- a/lib/Ninka/SentenceTokenizer.pm +++ b/lib/Ninka/SentenceTokenizer.pm @@ -1,27 +1,4 @@ package Ninka::SentenceTokenizer; -# -# Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -# -# senttok.pl -# -# This script creates a file that corresponds to the recognized sentence tokens. -# For each sentence, it outputs its sentence token, or unknown otherwise. -# use strict; #use warnings; @@ -351,3 +328,32 @@ sub read_license_sentences { } 1; + +__END__ + +=head1 NAME + +Ninka::SentenceTokenizer + +=head1 DESCRIPTION + +For each sentence, it outputs its recognized sentence token, or unknown otherwise. + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2009-2010 Yuki Manabe and Daniel M. German + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. + +=cut |