• english
  • français
  • español
  • العربية
  • 中文
spacer
Home » Drupal tips and tricks

Drupal: "Agrovoc Field" module to index nodes with Agrovoc

Sat, 05/02/2011 — valeria.pesce
  • AgriDrupal
  • AGROVOC
  • H05G1190602
  • H05G11906
  • H05G119

Adam Sanchez of CONDESAN (Peru), a member of the AgriDrupal community, in coordination with the AIMS team in FAO and with the IT team in GFAR, just released the alpha version of a Drupal module called "Agrovoc Field". This module is available for testing and will be later released to the whole Drupal community.

The Agrovoc Field module is a module for manually indexing nodes using Agrovoc concepts.

This module creates a new CCK field (called Agrovoc and derived from the Content Taxonomy field) that allows to select Agrovoc terms through an autocomplete textbox connecting to the Agrovoc web services 2.0.

Being a CCK field synchronized with a taxonomy, it allows to exploit both CCK and taxonomy features in Drupal.

The module has very good and very well integrated multi-lingual support: when indexing a node, the module lists Agrovoc terms in the website currently active language, but then stores the selected terms in all the languages enabled in the website. When switching to a different language, the corresponding Agrovoc terms in that language will be displayed and when translating a node that has already been indexed, the translated Agrovoc terms will be displayed and the autocomplete field will only list terms in that language.

The author of this module is already in contact with the author of another Agrovoc Drupal module (drupal.org/project/agrovoc) to coordinate on development.

Both modules derive from the same initial developments in CONDESAN and use the same basic functionalities (a common API), but the Agrovoc module only integrates Agrovoc with the Drupal taxonomy, while the Agrovoc Field module integates it also with CCK.

Coordination on the development of these two modules will probably lead to the release of a co-maintained module called "Agrovoc API" and two different interface modules. 

The next version of the module (or the next version of the Agrovoc API module) will include the option to use the Agrovoc SPARQL endpoint instead of the soon obsolete Agrovoc web services 2.0. 

Here there is a video tutorial on how to install the module and how it works.

The module is available for download (together with the Agrovoc API module) here:
www.agridrupal.org/downloads/agridrupal_modules/agrovoc_drupal_modules.

Tags: 
AGROVOC
AgriDrupal
‹ Drupal tips and tricks up Drupal: indexing nodes with Agrovoc (without a module) ›
Groups:
  • AgriDrupal
  • Printer-friendly version
  • Login or register to post comments

15 Feb 2011 spacer
Adam Sanchez Ayte

architecture of agrovocfield module

I am attaching a document about architecture of agrovocfield module.
I hope be useful for all.
AttachmentSize
agrovocfield architecture.pdf 108.99 KB
  • Login or register to post comments
18 Mar 2011 spacer
John Fereira

Agrovoc field module

I just recently finished watching the demonstration of the Agrovoc Field module and looked over the code of the agrovoc module (www.drupal.org/project/agrovoc) and though I'd add a couple of comments.

When watching the video and looking over the code I couldn't help but wonder how such a service would work in a low bandwidth environment.  I really like the idea of using autocomplete for taxonomy or CCK field values but when the data source is at the end of a web service I have to wonder how well it would work at a site which had very slow internet connectivity. 

I have been looking at the use of RDF in Drupal6 and specifically at the SimpleRDF module.  That module contains a sub-module called simplerdf_taxonomy and provides a facilty to expose drupal taxonomies as RDF.  That led me to another module called taxonomy_xml.  The taxonomy_xml modules provides functionality for not only exporting a drupal taxonomy in multiple formats (including RDF) but also can be used to import vocabulary/terms into a drupal taxonomy.  I also came across a patch (which I had to tweak a bit) that can be used export or import a vocabulary defined using SKOS.   I found a version of agrovoc in skos (as a zipfile) and ran an import.  It took a very long time but eventually all of the terms were imported.   However, it seemed that many (if not all) of the broader/narrower/related URIs were not resolving correctly so it wasn't creating the appropriate parent/child relationships.  However, I found a really simple recipes thesaurus vocabulary in SKOS and it did create the relationships correctly.   I have to wonder if using something like taxonomy_xml to import a large vocabular like agrovoc then have auto-complete search against the native taxonomy might make the Agrovoc Field  (or AgrovocAPI) modules more useful in environments which don't have good internet connectivity.

I think there is still some work  that could be done to integrate the taxonomy_xml and the simplerdf_taxonomy modules.  For example,  when performing the import, if it could just copy the skos mappings from the data source to  the RDF mapping fields that simplerdf provides it would not only be able to import a complete taxonomy but it content exposed through the sites as RDF (using SimpleRDF) could have linked open data properties to the taxonomy.

  • Login or register to post comments
22 Mar 2011 spacer
Adam Sanchez Ayte

Re: Agrovoc field module

Thanks for your commentaries. You are right respect to limitations for low bandwidth environment.
But, please take in account that we can expand possibilities of this field through building of new widgets.
At this  moment, this module is composed by a field called agrovocfield and a widget called agrovocfield_autocomplete. But, by example, we can add a widget called agrovocfield_popup to manage fetched terms from Agrovoc Server but using a window popup. In that way we can do a query each time and in that way decreases bandwidth consumption. It's only an idea, sure we could think in other alternatives for widgets.

Adam

  • Login or register to post comments
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.