Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.338.481 Times

magpy 0.3.0

  Date Added: September 05, 2010  |  Visits: 681

magpy

Report Broken Link
Printer Friendly Version


Product Homepage
Download (93 downloads)



Magpy is a Python wrapper for the mg search engine. magpy module features fast full text sarch, indexing and boolean queries. Both mg and magpy are released under the GPL (General Public License). Installation: To install magpy from source, extract the archive magpy-*.tar.gz, and run the following commands: ./configure python setup.py build python setup.py install Usage: The following script demonstrates a simple search frontend: #!/usr/bin/python import mgindexer import mgquery import sys store = mgquery.MGSearchStore("/tmp/data","alice") while 1: query = sys.stdin.readline() q = store.newQuery(query) print "Searching for",query,"(words",q.words(),")" for docnum,ranking in q.execute(): print "Document",docnum,"matches (Ranking",ranking,")" Before this works, you first have to create search store at (here) the location "/tmp/data", with the name "alice". The following script creates such a store from a raw text file, which it splits into individual documents by splitting it into paragraphs. #!/usr/bin/python import mgindexer fi = open("alice13a.txt", "rb") fo = open("alice13a.splitted.txt", "wb") for line in fi.readlines(): # split the file on the paragraph boundaries if line.strip() == "": fo.write(mgindexer.SEPARATOR) else: fo.write(line) fo.close() fi.close() mgindexer.makeindex("alice13a.splitted.txt", "/tmp/data/", "alice") If you have many individual documents you would like to run a search on, the following script is probably closer to what you need (notice it creates a new collection of the name "files", so you have to substitute "alice" by "files" in the example query script above): #!/usr/bin/python import mgindexer import os PATH = "files/" fo = open("searchdata.txt", "wb") for file in os.listdir(PATH): if os.path.isfile(PATH + file): # copy file fi = open(PATH + file, "rb") for line in fi.readlines(): fo.write(line) # write document boundary fo.write(mgindexer.SEPARATOR) fo.close() mgindexer.makeindex("searchdata.txt", "/tmp/data", "files") Whats New in This Release: - This release adds support for wildcard search (truncation). - Document types that have delimiters different from whitespace are now supported..

Requirements: No special requirements
Platforms: Linux
Keyword: File Import Libraries Magpy Mg Path Programming Python Search
Users rating: 0/10

License: Freeware Size: 327.68 KB
USER REVIEWS
More Reviews or Write Review


MAGPY RELATED
Programming  -  PATH programming language 0.33
PATH is a very different programming language than what you are probably used to if youre an average programmer. If youve programmed in the language Brainf*ck, youll recognize the memory cell architecture. Also, Befunge programmers will recognize...
10.24 KB  
Libraries  -  File::Basename 5.8.8
File::Basename is a Perl module to parse file paths into directory, filename and suffix. SYNOPSIS use File::Basename; ($name,$path,$suffix) = fileparse($fullname,@suffixlist); $name = fileparse($fullname,@suffixlist); $basename =...
12.2 MB  
Text Management  -  Yet Another Python Templating Utility (YAPTU) 1.5
"Templating" (copying an input file to output, on the fly inserting Python expressions and statements) is a frequent need, and YAPTU is a small but complete Python module for that; expressions and statements are identified by arbitrary user-chosen...
 
Modules  -  File import 5.x- 1.0
This module is very useful when used with modules that require importing of large quantities of files.InstallationUnpack in your modules folder (usually /sites/all/modules/) and enable under Administer > Site Building > Modules. Requirements: -...
 
Modules  -  File import 5.x- 1.0
This module is very useful when used with modules that require importing of large quantities of files.InstallationUnpack in your modules folder (usually /sites/all/modules/) and enable under Administer > Site Building > Modules. Requirements: -...
 
Modules  -  Entrez Database Import 6.x-1.0-beta1
This module allows to import PubMed articles by ID and by Search term into the biblio database. Moderated mass retrieval per Batch API and cronjob as well as automatic updates in cron makes it a valuable addition to the biblio module.Built mostly...
30.72 KB  
ActiveX Components  -  MinGW 3.4.1
The GNU Compiler Collection (GCC) for Windows MinGW - A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do...
15 MB  
Modules  -  Advanced cache 1.0
It provides caching nodes, comments, taxonomy (terms, trees, vocabularies and terms-per-node), path aliases, and search results. The module creates dedicated cache tables and makes use of Drupal's core cache API to cache data in an efficient...
 
File Utilities  -  DiskBoss Network 1.8.12
DiskBoss is an automated, rule-based file and disk management solution allowing one to search, classify and categorize files, perform disk space utilization analysis, automatically organize files according to user-defined rules and policies, copy...
 
Libraries  -  Python SRS Library 0.30.11
Python SRS Library is a Python implementation of the Sender Rewriting Scheme. Python SRS Library is a fairly direct translation of the draft implementation in Perl by Shevek. It includes a test suite, which currently checks four levels of...
37.89 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB