Main > Free Download Search >

Free text program software for linux

text program

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3031
Text::Ngrams 1.9

Text::Ngrams 1.9


Text::Ngrams is a flexible Ngram analysis (for characters, words, and more). more>>
Text::Ngrams is a flexible Ngram analysis (for characters, words, and more).
SYNOPSIS
For default character n-gram analysis of string:
use Text::Ngrams;
my $ng3 = Text::Ngrams->new;
$ng3->process_text(abcdefg1235678hijklmnop);
print $ng3->to_string;
my @ngramsarray = $ng3->get_ngrams;
One can also feed tokens manually:
use Text::Ngrams;
my $ng3 = Text::Ngrams->new;
$ng3->feed_tokens(a);
$ng3->feed_tokens(b);
$ng3->feed_tokens(c);
$ng3->feed_tokens(d);
$ng3->feed_tokens(e);
$ng3->feed_tokens(f);
$ng3->feed_tokens(g);
$ng3->feed_tokens(h);
We can choose n-grams of various sizes, e.g.:
my $ng = Text::Ngrams->new( windowsize => 6 );
or different types of n-grams, e.g.:
my $ng = Text::Ngrams->new( type => byte );
my $ng = Text::Ngrams->new( type => word );
my $ng = Text::Ngrams->new( type => utf8 );
To process a list of files:
$ng->process_files(somefile.txt, otherfile.txt);
This module implement text n-gram analysis, supporting several types of analysis, including character and word n-grams.
The module Text::Ngrams is very flexible. For example, it allows a user to manually feed a sequence of any tokens. It handles several types of tokens (character, word), and also allows a lot of flexibility in automatic recognition and feed of tokens and the way they are combined in an n-gram. It counts all n-gram frequencies up to the maximal specified length. The output format is meant to be pretty much human-readable, while also loadable by the module.
The module can be used from the command line through the script ngrams.pl provided with the package.
Version restrictions:
- If a user customizes a type, it is possible that a resulting n-gram will be ambiguous. In this way, to different n-grams may be counted as one. With predefined types of n-grams, this should not happen. For example, if a user chooses that a token can contain a space, and uses space as an n-gram separator, then a trigram like this "x x x x" is ambiguous.
- Method process_file does not handle multi-line tokens by default. This can be fixed, but it does not seem to be worth the code complication. There are various ways around this if one really needs such tokens: One way is to preprocess them. Another way is to read as much text as necessary at a time then to use process_text, which does handle multi-line tokens.
<<less
Download (0.036MB)
Added: 2007-08-22 License: Perl Artistic License Price:
802 downloads
Text::Reform 1.11

Text::Reform 1.11


Text::Reform is a Perl module for manual text wrapping and reformatting. more>>
Text::Reform is a Perl module for manual text wrapping and reformatting.

SYNOPSIS

use Text::Reform;

print form $template,
$data, $to, $fill, $it, $with;


use Text::Reform qw( tag );

print tag B, $enboldened_text;

The form sub

The form() subroutine may be exported from the module. It takes a series of format (or "picture") strings followed by replacement values, interpolates those values into each picture string, and returns the result. The effect is similar to the inbuilt perl format mechanism, although the field specification syntax is simpler and some of the formatting behaviour is more sophisticated.

A picture string consists of sequences of the following characters:

<

Left-justified field indicator. A series of two or more sequential

Right-justified field indicator. A series of two or more sequential >s specify a right-justified field to be filled by a subsequent value. A single < is formatted as the literal character <



Fully-justified field indicator. Field may be of any width, and brackets need not balance, but there must be at least 2 < and 2 >.

^

Centre-justified field indicator. A series of two or more sequential ^s specify a centred field to be filled by a subsequent value. A single ^ is formatted as the literal character <

>>>. br ]]].[[[[ br br A numerically formatted block field with the specified number of digits to either side of the decimal place. Just like a >>.<<less
Download (0.020MB)
Added: 2007-08-22 License: Perl Artistic License Price:
793 downloads
Text::Graph 0.23

Text::Graph 0.23


Text::Graph is a Perl extension for generating text-based graphs. more>>
Text::Graph is a Perl extension for generating text-based graphs.

SYNOPSIS

use Text::Graph;
blah blah blah

Some data is easier to analyze graphically than in its raw form. In many cases, however, a full-blown multicolor graphic representation is overkill. In these cases, a simple graph can provide an appropriate graphical representation.

The Text::Graph module provides a simple text-based graph of a dataset. Although this approach is not appropriate for all data analysis, it can be useful in some cases.

<<less
Download (0.009MB)
Added: 2006-08-28 License: Perl Artistic License Price:
1153 downloads
Text::Roman 3.01

Text::Roman 3.01


Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms. more>>
Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms.

SYNOPSIS

use Text::Roman;

print roman(123);

Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.

Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like Xv, XiiI, as legal roman algarism numbers.

roman($int): return string containing the roman corresponding to the given integer, or if the integer is out of domain...

roman2int($str): return if $str is not roman or return integer if it is.

isroman($str): verify whether the given string is a conventional roman number, if it is return 1; if it is not return 0...

Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.

<<less
Download (0.003MB)
Added: 2007-07-27 License: Perl Artistic License Price:
821 downloads
Text::Macro 0.07

Text::Macro 0.07


Text::Macro Perl module is a template facility whos focus is on generating code such as c, java or sql. more>>
Text::Macro Perl module is a template facility whos focus is on generating code such as c, java or sql. While generating perl code is also possible, there is a potential conflict between the control-symbol and the perl comment symbol.
Perl is excelent at manipulating text, and it begs the question why one would need such a tool.
The answer is that good code design should be such that applications should not have to be modified so as to make configuration changes. Thus external configuration files/data is used. However, if these files are read in as perl-code, then simple errors could crash the whole application (or provide subtle security risks). Further, it is often desired to invert the control flow and text-data (namely, make the embedded strings primary, and control-flow secondary). This is the ASP model, and for 90% HTML, 10% code, this works great.
This module supports many control facilities which directly translate into perl-control facilities (e.g. inverting the ASP-style code back into perl-style behind the scenes). The inversion process is cached in a simple user object.
The module was initially inspired by Text::FastTemplate by Robert Lehr, whos module didnt completely fullfill my needs.
Main features:
- fast, simple, robust
- code-generating-centric feature-set
- substitutions stand-out from template
- macro-code embedded in text
- OOP
- external and internal includes (for clearifying complex control-flow)
- scoped variable-substitutions
- line-based processing (like cpp)
- usable error messages
<<less
Download (0.012MB)
Added: 2007-05-31 License: Perl Artistic License Price:
877 downloads
Text::Graphics 1.0001

Text::Graphics 1.0001


Text::Graphics is a text graphics rendering toolkit. more>>
Text::Graphics is a text graphics rendering toolkit.

This is a toolkit for rendering plain text via an API like that used for graphics rendering in GUI toolkits. This package might be used when you want to do sophisticated rendering of plain text, e.g., for graphing, creating of complex forms for email and fax, and so on.

SYNOPSIS

use Text::Graphics;
my $text = "A text graphics rendering toolkit.n";
my $page = Text::Graphics::Page->new( 20, 10);
my $panel0 = Text::Graphics::BorderedPanel->new( 20, 10);
my $panel1 =
Text::Graphics::FilledBorderedTextPanel->new($text x 3, 25, 12);
$panel0->setBackground("#");
$panel1->setBackground(" ");
$page->add($panel0);
$page->add($panel1, 5, 2);
$page->render();

+-------------------+
|###################|
|####+--------------+
|####|A text graphic|
|####|rendering tool|
|####|text graphics |
|####|toolkit. A tex|
|####|graphics rende|
|####|toolkit. |
|####| |
+----+--------------+

<<less
Download (0.006MB)
Added: 2006-08-28 License: Perl Artistic License Price:
1152 downloads
Text::WikiFormat 0.79

Text::WikiFormat 0.79


Text::WikiFormat is a Perl module for translating Wiki formatted text into other formats. more>>
Text::WikiFormat is a Perl module for translating Wiki formatted text into other formats.

SYNOPSIS

use Text::WikiFormat;
my $html = Text::WikiFormat::format($raw);

The original Wiki web site had a very simple interface to edit and to add pages. Its formatting rules are simple and easy to use. They are also easy to translate into other, more complicated markup languages with this module. It creates HTML by default, but can produce valid POD, DocBook, XML, or any other format imaginable.

The most important function is format(). It is not exported by default.

format()

format() takes one required argument, the text to convert, and returns the converted text. It allows two optional arguments. The first is a reference to a hash of tags. Anything passed in here will override the default tag behavior. The second argument is a hash reference of options. They are currently:

prefix

The prefix of any links. In HTML mode, this is the path to the Wiki. The actual linked item itself will be appended to the prefix. This is useful to create full URIs:

{ prefix => http://example.com/wiki.pl?page= }

extended

A boolean flag, false by default, to use extended linking semantics. This comes from the Everything Engine (http://everydevel.com/), which marks links with square brackets. An optional title may occur after the link target, preceded by an open pipe. These are valid extended links:

[a valid link]
[link|title]

Where the linking semantics of the destination format allow it, the result will display the title instead of the URI. In HTML terms, the title is the content of an A element (not the content of its HREF attribute).

You can use delimiters other than single square brackets for marking extended links by passing a value for extended_link_delimiters in the %tags hash when calling format.

implicit_links

A boolean flag, true by default, to create links from StudlyCapsStringsNote that if you disable this flag, you should probably enable the extended one also, or there will be no way of creating links in your documents. To disable it, use the pair:

{ implicit_links => 0 }

absolute_links

A boolean flag, false by default, which treats any links that are absolute URIs (such as http://www.cpan.org/) specially. Any prefix will not apply and the URIs arent quoted. Use this in conjunction with the extended option to detect the link.

A link is any text that starts with a known schema followed by a colon and one or more non-whitespace characters. This is a distinct subset of what URI recognizes as a URI, but is a good first-order approximation. If you need to recognize more complex URIs, use the standard wiki formatting explained earlier.

The recognized schemas are those defined in the schema value in the %tags hash. The defaults are http, https, ftp, mailto, and gopher.

<<less
Download (0.028MB)
Added: 2007-08-22 License: Perl Artistic License Price:
793 downloads
Text::Refer 1.106

Text::Refer 1.106


Text::Refer can parse Unix refer files. more>>
Text::Refer can parse Unix "refer" files.

SYNOPSIS

Pull in the module:

use Text::Refer;

Parse a refer stream from a filehandle:

while ($ref = input Text::Refer *FH) {
# ...do stuff with $ref...
}
defined($ref) or die "error parsing input";

Same, but using a parser object for more control:

# Create a new parser:
$parser = new Text::Refer::Parser LeadWhite=>KEEP;

# Parse:
while ($ref = $parser->input(*FH)) {
# ...do stuff with $ref...
}
defined($ref) or die "error parsing input";

Manipulating reference objects, using high-level methods:

# Get the title, author, etc.:
$title = $ref->title;
@authors = $ref->author; # list context
$lastAuthor = $ref->author; # scalar context

# Set the title and authors:
$ref->title("Cyberiad");
$ref->author(["S. Trurl", "C. Klapaucius"]); # arrayref for >1 value!

# Delete the abstract:
$ref->abstract(undef);

Same, using low-level methods:

# Get the title, author, etc.:
$title = $ref->get(T);
@authors = $ref->get(A); # list context
$lastAuthor = $ref->get(A); # scalar context

# Set the title and authors:
$ref->set(T, "Cyberiad");
$ref->set(A, "S. Trurl", "C. Klapaucius");

# Delete the abstract:
$ref->set(X); # sets to empty array of values

Output:

print $ref->as_string;

<<less
Download (0.031MB)
Added: 2007-08-22 License: Perl Artistic License Price:
794 downloads
Text::Convert::ToImage

Text::Convert::ToImage


Text::Convert::ToImage is a Perl module. more>>
Text::Convert::ToImage is a Perl module.

SYNOPSIS

use Text::Convert::ToImage;
my $tti = Text::Convert::ToImage->new();
my $length = length($email);
if ($length > 150) {
$email = "Your text length of $length is too large:";
}
my $config = {
TEXT => $email ? $email : "y@hn.org",
POINTSIZE => $point_size ? $point_size : 14,
LEVEL => $level ? $level : 0,
FONT => $font,
XSKEW => $xskew,
YSKEW => $yskew,

};
$tti->calculate($config);
print "Content-type: image/pngnn";
binmode STDOUT;
$tti->Write(png:-);

This was knocked up a long time ago and someone asked me if the source was available so I decided to put it on CPAN. There is very little documentation with it.

There are also very few tests. If more than me and the person who asked for the module use it then I will write some tests for it.

At the moment I have been using it top obfuscate emails and not much else. A demo can be found at http://www.hjackson.org/cgi-bin/tools/email.pl

There are some undocumented features to this module and they are this way because I have not tested to see if they work yet.

<<less
Download (0.011MB)
Added: 2006-08-22 License: Perl Artistic License Price:
1158 downloads
Text::MacroScript 1.38

Text::MacroScript 1.38


Text::MacroScript is a macro pre-processor with embedded perl capability. more>>
Text::MacroScript is a macro pre-processor with embedded perl capability.

SYNOPSIS

use Text::MacroScript ;

# new() for macro processing

my $Macro = Text::MacroScript->new ;
while( ) {
print $Macro->expand( $_ ) if $_ ;
}

# Canonical use (the filename improves error messages):
my $Macro = Text::MacroScript->new ;
while( ) {
print $Macro->expand( $_, $ARGV ) if $_ ;
}

# new() for embedded macro processing

my $Macro = Text::MacroScript->new( -embedded => 1 ) ;
# Delimiters default to
# or
my $Macro = Text::MacroScript->new( -opendelim => [[, -closedelim => ]] ) ;
while( ) {
print $Macro->expand_delimited( $_, $ARGV ) if $_ ;
}

# Create a macro object and create initial macros/scripts from the file(s)
# given:
my $Macro = Text::MacroScript->new(
-file => [ local.macro, ~/.macro/global.macro ]
) ;

# Create a macro object and create initial macros/scripts from the
# definition(s) given:
my $Macro = Text::MacroScript->new(
-macro => [
[ MAX_INT => 32767 ],
],
-script => [
[ DHM2S =>
[
my $s = (#0*24*60*60)+(#1*60*60)+(#2*60) ;
"#0 days, #1 hrs, #2 mins = $s secs"
],
],
-variable => [ *MARKER* => 0 ],
) ;

# We may of course use any combination of the options.

my $Macro = Text::MacroScript->new( -comment => 1 ) ; # Create the %%[] macro.

# define()

$Macro->define( -macro, $macroname, $macrobody ) ;

$Macro->define( -script, $scriptname, $scriptbody ) ;

$Macro->define( -variable, $variablename, $variablebody ) ;

# undefine()

$Macro->undefine( -macro, $macroname ) ;

$Macro->undefine( -script, $scriptname ) ;

$Macro->undefine( -variable, $variablename ) ;

# undefine_all()

$Macro->undefine( -macro ) ;

$Macro->undefine( -script ) ;

$Macro->undefine( -variable ) ;

# list()

@macros = $Macro->list( -macro ) ;
@macros = $Macro->list( -macro, -namesonly ) ;

@scripts = $Macro->list( -script ) ;
@scripts = $Macro->list( -script, -namesonly ) ;

@variables = $Macro->list( -variable ) ;
@variables = $Macro->list( -variable, -namesonly ) ;

# load_file() - always treats the contents as within delimiters if we are
# doing embedded processing.

$Macro->load_file( $filename ) ;

# expand_file() - calls expand_embedded() if we are doing embedded
# processing otherwise calls expand().

$Macro->expand_file( $filename ) ;
@expanded = $Macro->expand_file( $filename ) ;


# expand()

$expanded = $Macro->expand( $unexpanded ) ;
$expanded = $Macro->expand( $unexpanded, $filename ) ;

# expand_embedded()

$expanded = $Macro->expand_embedded( $unexpanded ) ;
$expanded = $Macro->expand_embedded( $unexpanded, $filename ) ;

This bundle also includes the macro and macrodir scripts which allows us to expand macros without having to use/understand Text::MacroScript.pm, although you will have to learn the handful of macro commands available and which are documented here and in macro. macro provides more documentation on the embedded approach.

The macroutil.pl library supplied provides some functions which you may choose to use in HTML work for example.

<<less
Download (0.036MB)
Added: 2007-05-31 License: Perl Artistic License Price:
876 downloads
GD::Text 0.86

GD::Text 0.86


GD::Text is a Perl module with text utilities for use with GD. more>>
GD::Text is a Perl module with text utilities for use with GD.

SYNOPSIS

use GD;
use GD::Text;

my $gd_text = GD::Text->new() or die GD::Text::error();
$gd_text->set_font(funny.ttf, 12) or die $gd_text->error;
$gd_text->set_font(gdTinyFont);
$gd_text->set_font(GD::Font::Tiny);
...
$gd_text->set_text($string);
my ($w, $h) = $gd_text->get(width, height);

if ($gd_text->is_ttf)
{
...
}
Or alternatively
my $gd_text = GD::Text->new(
text => Some text,
font => funny.ttf,
ptsize => 14,
);

This module provides a font-independent way of dealing with text in GD, for use with the GD::Text::* modules and GD::Graph.

<<less
Download (0.063MB)
Added: 2006-10-02 License: Perl Artistic License Price:
648 downloads
Text::Replace 0.07

Text::Replace 0.07


Text::Replace is a Perl module to replace variables from a hash. more>>
Text::Replace is a Perl module to replace variables from a hash.

SYNOPSIS

#######
# Subroutine Interface
#
use Text::Replace qw(&replace_variables);
$success = replace_variables($template, %variable_hash, @variable);

########
# Class Interface
#
use Text::Replace;
$success = Text::Replace->replace_variables($template, %variable_hash, @variable);

The Text::Replace program module is simple and plain by design. The Text::Replace program module mimics the built-in Perl double quote, ", literal scalar that replaces Perl scalar variables named with a leading $. The Text::Replace program module stays in the background, just like John Williams movie scores.

There is no large manual thicker than the Bible with tricks and tips and gyrations to learn and to distract. The module is plain, simple with no expressiveness. The Text::Replace program module does only one thing: substitute a value for a variable. It is amazing how many times, just a simple double quote literal replacement in a small string or even a large text string gets the job done.

Does Text::Replace solve all variable replacement, template problems? Definitely not. There is no capabilities for inserting graphs, text wrap plug-ins, GD interface. If an application needs something this sophisticated, there are many fine template program modules in CPAN such as the highly rated Template program module.

<<less
Download (0.072MB)
Added: 2007-01-24 License: Perl Artistic License Price:
1003 downloads
Text::Scraper 0.02

Text::Scraper 0.02


Text::Scraper contains structured data from (un)structured text. more>>
Text::Scraper contains structured data from (un)structured text.

SYNOPSIS

use Text::Scraper;

use LWP::Simple;
use Data::Dumper;

#
# 1. Get our template and source text
#
my $tmpl = Text::Scraper->slurp(*DATA);
my $src = get(http://search.cpan.org/recent) || die $!;

#
# 2. Extract data from source
#
my $obj = Text::Scraper->new(tmpl => $tmpl);
my $data = $obj->scrape($src);

#
# 3. Do something really neat...(left as excercise)
#
print "Newest Submission: ", $data->[0]{submissions}[0]{name}, "nn";
print "Scraper model:n", Dumper($obj), "nn";
print "Parsed model:n", Dumper($data) , "nn";

__DATA__

< div class=path>< center>< table>< tr>
< ?tmpl stuff pre_nav ?>
< td class=datecell>< span>< big>< b> < ?tmpl var date_string ?> < /b>< /big>< /span>< /td>
< ?tmpl stuff post_nav ?>
< /tr>< /table>< /center>< /div>

< ul>
< ?tmpl loop submissions ?>
< li>< a href="< ?tmpl var link ?>">< ?tmpl var name ?>< /a>
< ?tmpl if has_description ?>
< small> -- < ?tmpl var description ?>< /small>
< ?tmpl end has_description ?>
< /li>
< ?tmpl end submissions ?>
< /ul>

ABSTRACT

Text::Scraper provides a fully functional base-class to quickly develop Screen-Scrapers and other text extraction tools. Programmatically generated text such as dynamic webpages are trivially reversed engineered.

Using templates, the programmer is freed from staring at fragile, heavily escaped regular expressions, mapping capture groups to named variables or wrestling with the DOM and badly formed HTML. In addition, extracted data can be hierarchical, which is beyond the capabilities of vanilla regular expressions.

Text::Scrapers functionality overlaps some existing CPAN modules - Template::Extract and WWW::Scraper.
Text::Scraper is much more lightweight than either and has a more general application domain than the latter. It has no dependencies on other frameworks, modules or design-decisions. On average, Text::Scraper benchmarks around 250% faster than Template::Extract - and uses significantly less memory.

Unlike both existing modules, Text::Scraper generalizes its functionality to allow the programmer to refine template capture groups beyond (.*?), fully redefine the template syntax and introduce new template constructs bound to custom classes.

<<less
Download (0.045MB)
Added: 2007-08-22 License: Perl Artistic License Price:
796 downloads
Tartan text parser 0.1.0

Tartan text parser 0.1.0


Tartan is a text parsing engine targeted at wiki text. more>>
Tartan is a text parsing engine targeted at wiki text. The syntax specification is defined in YAML in the form of regex-based rules.

It supports layering and multiple output types. Rules for Markdown to HTML are included, with optional layered extensions for tables. Tartan text parser is implemented in Ruby, but looking to have implementations in other languages.
<<less
Download (0.047MB)
Added: 2006-08-21 License: MIT/X Consortium License Price:
1159 downloads
Edit by Text Editors 0.1

Edit by Text Editors 0.1


Edit by Text Editors allows you to open a file with Kate, Kwrite, Kedit, Khexedit by a KDE service menu. more>>
Edit by Text Editors allows you to open a file with Kate, Kwrite, Kedit, Khexedit by a KDE service menu.

To install the service menu you must copy editby.desktop in ~/.kde/share/apps/konqueror/servicemenus

<<less
Download (MB)
Added: 2007-08-06 License: GPL (GNU General Public License) Price:
814 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5