Giter Site home page Giter Site logo

dvarrazzo / italian_fts Goto Github PK

View Code? Open in Web Editor NEW
10.0 5.0 2.0 2.56 MB

Italian full-text search dictionary and configuration for PostgreSQL

Home Page: https://www.varrazzo.com/fts_italiano/

License: GNU General Public License v2.0

Python 93.77% Makefile 5.77% PLpgSQL 0.46%
postgresql full-text-search italian italiano

italian_fts's Introduction

Italian Full-Text Search Dictionary

Author

Daniele Varrazzo

Contact

[email protected]

Organization

Develer S.r.l.

Source code

On GitHub

Download

From PGXN

Summary

This package provides an ISpell dictionary to perform high quality full text search in Italian documents using the PostgreSQL database.

Using the provided dictionary, search operations in Italian documents can keep into account morphological variations of Italian words, such as verb conjugations.

Copyright

2001, 2002 Gianluca Turconi

Copyright

2002, 2003, 2004 Gianluca Turconi and Davide Prina

Copyright

2004, 2005, 2006 Davide Prina

Copyright

2007-2020 Daniele Varrazzo

Package description

This package contains an ISpell dictionary useful to perform high quality full-text searches in Italian language documents. The package also contains installation and configuration files.

Prerequisites

This package can be used to install and configure the ISpell dictionary in all supported PostgreSQL versions.

Package installation

You can use the PGXN Client to install the dictionary:

$ [sudo] pgxn install italian_fts

This installs the extension files in the PostgreSQL cluster. Please check pgxn install options if you have more than one cluster.

After the package has been installed you can use SQL command CREATE EXTENSION to make the dictionary available in a database:

CREATE EXTENSION italian_fts;

Dictionary usage

The extension creates a text search dictionary italian_ispell and a text search configuration also called italian_ispell using the dictionary as a default and falling back to the Snowball stemmer italian_stem (installed by default by PostgreSQL) when a word is not found. Here is a result of the process of a sample text with the italian_ispell configuration:

=# select token, dictionary, lexemes
    from ts_debug('italian_ispell', $$
        Né più mai toccherò le sacre sponde
        ove il mio corpo fanciulletto giacque,
        Zacinto mia, che te specchi nell'onde
        del greco mar da cui vergine nacque
        ...
    $$)
    where array_upper(lexemes,1) <> 0;

    token     |   dictionary   |    lexemes
--------------+----------------+----------------
 più          | italian_ispell | {più}
 mai          | italian_ispell | {mai}
 toccherò     | italian_ispell | {toccare}
 sacre        | italian_ispell | {sacro}
 sponde       | italian_ispell | {sponda}
 ove          | italian_ispell | {ove}
 corpo        | italian_ispell | {corpo}
 fanciulletto | italian_ispell | {fanciulletto}
 giacque      | italian_ispell | {giacere}
 Zacinto      | italian_stem   | {zacint}
 specchi      | italian_ispell | {specchiare}
 onde         | italian_ispell | {onda}
 greco        | italian_ispell | {greco}
 mar          | italian_ispell | {mare}
 vergine      | italian_ispell | {vergine}
 nacque       | italian_ispell | {nascere}
(16 rows)

For general usage of the full-text search features in PostgreSQL please refer to the database documentation.

italian_fts's People

Contributors

dvarrazzo avatar pauloxnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

italian_fts's Issues

Fix readme after Luca Battarra's feedback

Quindi, le cose rilevanti che ho riscontrato su ubuntu sono:

  1. directory in /usr/share/postgresql/8.4/
  2. è necessario installare il pacchetto postgresql-server-dev-8.4 che
    contiene pg_config e pgxs (ci ho messo un tempo rilevante a capire che il
    make install si piantava per questo)
  3. il cluster creato dall'installazione di ubuntu ha un encoding errato,
    bisogna avere un cluster utf8
    (occhio credo distrugga i dati presenti nel cluster vecchio)
    pg_dropcluster --stop 8.4 main
    pg_createcluster --start -e UTF-8 8.4 main

Installazione

Salve, premetto che so poco o nulla di PGsql...
Ho seguito le indicazioni per installare l'estensione, sono arrivato fino alla query CREATE EXTENSION italian_fts; però a questo punto mi domando, serve una configurazione particolare? Oppure di default l'estensione è pronta?

Nel caso, che configurazione bisogna scrivere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.