Mailing List Archive

r3671 - in trunk: c_src/KinoSearch c_src/KinoSearch/Posting perl/lib/KinoSearch perl/lib/KinoSearch/Posting
Author: creamyg
Date: 2008-07-29 18:47:38 -0700 (Tue, 29 Jul 2008)
New Revision: 3671

Modified:
trunk/c_src/KinoSearch/Posting.bp
trunk/c_src/KinoSearch/Posting/MatchPosting.bp
trunk/c_src/KinoSearch/Posting/RichPosting.bp
trunk/c_src/KinoSearch/Posting/ScorePosting.bp
trunk/perl/lib/KinoSearch/Posting.pm
trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm
trunk/perl/lib/KinoSearch/Posting/RichPosting.pm
trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
Log:
Migrate docs for Posting and subclasses to C.


Modified: trunk/c_src/KinoSearch/Posting/MatchPosting.bp
===================================================================
--- trunk/c_src/KinoSearch/Posting/MatchPosting.bp 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/c_src/KinoSearch/Posting/MatchPosting.bp 2008-07-30 01:47:38 UTC (rev 3671)
@@ -1,5 +1,14 @@
parcel KinoSearch cnick Kino;

+/** Match but not score documents.
+ *
+ * TODO: This class is not yet fully implemented.
+ *
+ * Use MatchPosting for fields which only need to be matched, not scored. For
+ * instance, if you need to determine that that a query matches a particular
+ * category, but don't want the match to contribute to the document score, use
+ * MatchPosting for the field.
+ */
class KinoSearch::Posting::MatchPosting cnick MatchPost
extends KinoSearch::Posting {


Modified: trunk/c_src/KinoSearch/Posting/RichPosting.bp
===================================================================
--- trunk/c_src/KinoSearch/Posting/RichPosting.bp 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/c_src/KinoSearch/Posting/RichPosting.bp 2008-07-30 01:47:38 UTC (rev 3671)
@@ -1,5 +1,16 @@
parcel KinoSearch cnick Kino;

+/** Posting with per-position boost.
+ *
+ * RichPosting is similar to L<ScorePosting|KinoSearch::Posting::ScorePosting>,
+ * but weighting is per-position rather than per-field. To exploit this, you need a
+ * custom L<Analyzer|KinoSearch::Analysis::Analyzer> which assigns varying
+ * boosts to individual L<Token|KinoSearch::Analysis::Token> objects.
+ *
+ * A typical application for RichPosting is an HTMLAnalyzer which assigns
+ * boost based on the visual size and weight of the marked up text: H1
+ * blocks get the greatest weight, H2 blocks almost as much, etc.
+ */
class KinoSearch::Posting::RichPosting cnick RichPost
extends KinoSearch::Posting::ScorePosting {


Modified: trunk/c_src/KinoSearch/Posting/ScorePosting.bp
===================================================================
--- trunk/c_src/KinoSearch/Posting/ScorePosting.bp 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/c_src/KinoSearch/Posting/ScorePosting.bp 2008-07-30 01:47:38 UTC (rev 3671)
@@ -1,5 +1,11 @@
parcel KinoSearch cnick Kino;

+/** Default posting type.
+ *
+ * ScorePosting is the default posting format in KinoSearch. The term-document
+ * pairing used by MatchPosting is supplemented by additional frequency,
+ * position, and impact (weighting) information.
+ */
class KinoSearch::Posting::ScorePosting cnick ScorePost
extends KinoSearch::Posting::MatchPosting {


Modified: trunk/c_src/KinoSearch/Posting.bp
===================================================================
--- trunk/c_src/KinoSearch/Posting.bp 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/c_src/KinoSearch/Posting.bp 2008-07-30 01:47:38 UTC (rev 3671)
@@ -1,7 +1,14 @@
parcel KinoSearch cnick Kino;

-/**
- * Vessel holding statistical data for a posting.
+/** Vessel holding statistical data for a posting.
+ *
+ * A Posting, in KinoSearch, is a vessel which stores information about a
+ * term-document match. (See L<KinoSearch::Docs::IRTheory> for the
+ * academic definition of "posting".)
+ *
+ * Subclasses include L<MatchPosting|KinoSearch::Posting::MatchPosting>, the
+ * simplest posting format, and
+ * L<ScorePosting|KinoSearch::Posting::ScorePosting>, the default.
*/
class KinoSearch::Posting cnick Post extends KinoSearch::Util::Stepper {


Modified: trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/perl/lib/KinoSearch/Posting/MatchPosting.pm 2008-07-30 01:47:38 UTC (rev 3671)
@@ -6,23 +6,7 @@

__AUTO_XS__

-{ "KinoSearch::Posting::MatchPosting" => {
- make_constructors => ["new"],
- }
-}
-
-__POD__
-
-=head1 NAME
-
-KinoSearch::Posting::MatchPosting - Match but not score documents.
-
-=head1 TODO
-
-This class is not yet fully implemented.
-
-=head1 SYNOPSIS
-
+my $synopsis = <<'END_SYNOPSIS';
# MatchPosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
use base qw( KinoSearch::FieldSpec::text );
@@ -30,20 +14,20 @@
my $self = shift;
return KinoSearch::Posting::MatchPosting->new(@_);
}
+END_SYNOPSIS

-=head1 DESCRIPTION
+{ "KinoSearch::Posting::MatchPosting" => {
+ make_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ }
+ }
+}

-Use MatchPosting for fields which only need to be matched, not scored. For
-instance, if you need to determine that that a query matches a particular
-category, but don't want the match to contribute to the document score, use
-MatchPosting for the field.
+__COPYRIGHT__

-=head1 COPYRIGHT
+Copyright 2005-2008 Marvin Humphrey

-Copyright 2007-2008 Marvin Humphrey
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.

-=head1 LICENSE, DISCLAIMER, BUGS, etc.
-
-See L<KinoSearch> version 0.20.
-
-=cut

Modified: trunk/perl/lib/KinoSearch/Posting/RichPosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/RichPosting.pm 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/perl/lib/KinoSearch/Posting/RichPosting.pm 2008-07-30 01:47:38 UTC (rev 3671)
@@ -6,19 +6,7 @@

__AUTO_XS__

-{ "KinoSearch::Posting::RichPosting" => {
- make_constructors => ["new"],
- }
-}
-
-__POD__
-
-=head1 NAME
-
-KinoSearch::Posting::RichPosting - Posting with per-position boost.
-
-=head1 SYNOPSIS
-
+my $synopsis = <<'END_SYNOPSIS';
# RichPosting is used indirectly, by specifying in FieldSpec subclass.
package MySchema::Category;
use base qw( KinoSearch::FieldSpec::text );
@@ -26,24 +14,20 @@
my $self = shift;
return KinoSearch::Posting::RichPosting->new(@_);
}
+END_SYNOPSIS

-=head1 DESCRIPTION
+{ "KinoSearch::Posting::RichPosting" => {
+ make_constructors => ["new"],
+ make_pod => {
+ synopsis => $synopsis,
+ }
+ }
+}

-RichPosting is similar to L<ScorePosting|KinoSearch::Posting::ScorePosting>,
-but weighting is per-position rather than per-field. To exploit this, you need a
-custom L<Analyzer|KinoSearch::Analysis::Analyzer> which assigns varying
-boosts to individual L<Token|KinoSearch::Analysis::Token> objects.
+__COPYRIGHT__

-A typical application for RichPosting is an HTMLAnalyzer which assigns
-boost based on the visual size and weight of the marked up text: H1
-blocks get the greatest weight, H2 blocks almost as much, etc.
+Copyright 2005-2008 Marvin Humphrey

-=head1 COPYRIGHT
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.

-Copyright 2007-2008 Marvin Humphrey
-
-=head1 LICENSE, DISCLAIMER, BUGS, etc.
-
-See L<KinoSearch> version 0.20.
-
-=cut

Modified: trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/perl/lib/KinoSearch/Posting/ScorePosting.pm 2008-07-30 01:47:38 UTC (rev 3671)
@@ -6,9 +6,23 @@

__AUTO_XS__

+my $synopsis = <<'END_SYNOPSIS';
+ # ScorePosting is used indirectly, by specifying in FieldSpec subclass.
+ package MySchema::Category;
+ use base qw( KinoSearch::FieldSpec::text );
+ # (It's the default, so you don't need to spec it.)
+ # sub posting {
+ # my $self = shift;
+ # return KinoSearch::Posting::ScorePosting->new(@_);
+ # }
+END_SYNOPSIS
+
{ "KinoSearch::Posting::ScorePosting" => {
- make_getters => [qw( freq impact )],
make_constructors => ["new"],
+ make_getters => [qw( freq impact )],
+ make_pod => {
+ synopsis => $synopsis,
+ }
}
}

@@ -34,35 +48,10 @@
}
OUTPUT: RETVAL

-__POD__
+__COPYRIGHT__

-=head1 NAME
+Copyright 2005-2008 Marvin Humphrey

-KinoSearch::Posting::ScorePosting - Default posting type.
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.

-=head1 SYNOPSIS
-
- # ScorePosting is used indirectly, by specifying in FieldSpec subclass.
- package MySchema::Category;
- use base qw( KinoSearch::FieldSpec::text );
- # (It's the default, so you don't need to spec it.)
- # sub posting {
- # my $self = shift;
- # return KinoSearch::Posting::ScorePosting->new(@_);
- # }
-
-=head1 DESCRIPTION
-
-ScorePosting is the default posting format in KinoSearch. The term-document
-pairing used by MatchPosting is supplemented by additional frequency,
-position, and impact (weighting) information.
-
-=head1 COPYRIGHT
-
-Copyright 2007-2008 Marvin Humphrey
-
-=head1 LICENSE, DISCLAIMER, BUGS, etc.
-
-See L<KinoSearch> version 0.20.
-
-=cut

Modified: trunk/perl/lib/KinoSearch/Posting.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Posting.pm 2008-07-30 01:20:41 UTC (rev 3670)
+++ trunk/perl/lib/KinoSearch/Posting.pm 2008-07-30 01:47:38 UTC (rev 3671)
@@ -8,37 +8,16 @@

{ "KinoSearch::Posting" => {
make_getters => [qw( doc_num )],
+ make_pod => {
+ synopsis => " # Abstract base class.\n",
+ },
},
}

-__POD__
+__COPYRIGHT__

-=head1 NAME
+Copyright 2005-2008 Marvin Humphrey

-KinoSearch::Posting - Base class for Postings.
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.

-=head1 SYNOPSIS
-
- # abstract base class
-
-=head1 DESCRIPTION
-
-A Posting, in KinoSearch, is a vessel which stores information about a
-term-document match. See L<KinoSearch::Docs::IRTheory> for the
-academic definition of "posting" or you'll be mighty confused.
-
-Subclasses include L<MatchPosting|KinoSearch::Posting::MatchPosting>, the
-simplest posting format, and
-L<ScorePosting|KinoSearch::Posting::ScorePosting>, the default.
-
-=head1 COPYRIGHT
-
-Copyright 2007-2008 Marvin Humphrey
-
-=head1 LICENSE, DISCLAIMER, BUGS, etc.
-
-See L<KinoSearch> version 0.20.
-
-=cut
-
-


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits