collective.ots

by Christian Ledermann last modified Dec 07, 2011 08:28 AM

Writing a good summary (description) is hard, let the Open Text Summarizer (OTS) do the heavy lifting. This tool extracts a summary of the content and sets it as the description of the content item you added

Project Description

The summary may not be perfect but it is a good starting point for a description. Mostly the summary is pretty good though. The description is only auto generated when you ADD a new Archetypes content item WITHOUT a description. You may edit this description at any time. You can invoke the summarizer on existing content items by selecting 'Summarize' from the 'Actions' menu (see screenshot)

Install using buildout:

Just add collective.ots (and optionally ots) to the egges section of you buildout

eggs:
    ...
    ots
    collective.ots

Run buildout, restart your server and activate the product in your add ons section. You do not have to use the ots egg (http://pypi.python.org/pypi/ots) if you have problems installing it. Any ots found in your system will do, so you may install it with:

sudo apt-get install libots0

or the package manager of your distribution, or install it from source.

check that ots is installed and working with:

ots -?

which will give you the output:

Usage:
  ots [OPTION...] [file.txt | stdin]  - Open Text Summarizer

Help Options:
  -?, --help                Show help options

Application Options:
  -r, --ratio=<int>         summarization % [default = 20%]
  -d, --dic=<string>        dictionary to use
  -o, --out=<string>        output file [default = stdout]
  -h, --html                output as html
  -k, --keywords            only output keywords
  -a, --about               only output the summary
  -v, --version             show version information

Installing ots from source

If you have to install ots from source my recommendation is to use the ots supplied with http://pypi.python.org/pypi/ots/0.4.2.1

tar -xvz ots-0.4.2.1.tar.gz
cd ots-0.4.2.1/lib/
tar -xfvj ots-0.4.2+cvs.2004.02.20.tar.bz2
cd ots-0.4.2+cvs.2004.02.20
./configure --prefix=/path/to/install/ots 
make 
make install

if you get an error like;

configure: error: popt 1.5 or newer is required to build ots.
You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/

install popt in the same directory where you want to install ots e.g. with

./configure --prefix=/path/to/install/ots 
make
make install

and ots with:

./configure --prefix=/path/to/install/ots --with-popt-prefix=/path/to/install/ots
make
make install

Windows

I have only tested it on Linux but it should work on any unixish OS. When you use windows (a binary is available on http://libots.sourceforge.net)  you are pretty much on your own, but if you get it working please report back how to install it on that system.

Mac

There is a port available for OSX

Self-Certification

[X] Internationalized

[ ] Unit tests

[X] End-user documentation

[ ] Internal documentation (documentation, interfaces, etc.)

[X] Existed and maintained for at least 6 months

[X] Installs and uninstalls cleanly

[X] Code structure follows best practice

Current Release
collective.ots 0.3

Released Nov 16, 2011 — tested with Plone 4.1, Plone 4

remove id and title from SearchableText
More about this release…

Download file Get collective.ots for all platforms
Product Package
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
0.3 Nov 16, 2011 remove id and title from SearchableText More about this release…
Plone 4.1
Plone 4
GPL final
0.2 Sep 28, 2011 catch exceptions if ots is not found More about this release…
Plone 4.1
Plone 4
GPL release-candidate
0.1 initial release More about this release…
Plone 4
GPL beta

Comments (0)