Sign In with your Yahoo! ID or Join Now

Module Reference: Deprecated Modules

These modules will continue to work however, we're discouraging their use because we've introduced new modules with improved functionality.

Module Input: items | Module Output: items

BabelFish Module

BabelFish is a language translation service. You can translate between various languages, including English, French, Japanese, Dutch, German, Italian, Chinese, and several others.

The title and description elements of RSS feeds are translated.

To use this module, you wire an input feed into it, then select a translation option (such as "Greek to French" or "Portuguese to English") from the list box.

This module has been replaced with the Translate module

Example: Run this Pipe | View Source

Our example uses the Yahoo! Search module to find pages on the French government site on tourism (or tourisme in French). We pass the resulting data through BabelFish and translate from French into English.

Module Input: items | Module Output: items

Content Analysis Module

This module analyzes each item in an RSS feed and tries to find the most significant few words within it. A new y:content_analysis element is added to the output feed. For example, a news feed with a headline like "Pioneering treatment for brain cancer gets Swiss approval" may get a y:content_analysis value of "brain cancer". An item titled "FDA approves patch to treat dementia" may yield a y:content_analysis of simply "dementia".

This module has been replaced with the Term Extractor module

Example: Run this Pipe | View Source

The Content Analysis module can help cross-reference information from one feed to items in another feed. Some Source modules, like Flickr, Yahoo! Search, and Google Base, use keywords to drive their searches.

This example fetches a news feed and pipes it through the Content Analysis module. The feed is then piped into a For Each: Annotate module containing a Yahoo! Search module. With the two feeds wired together, we can use an element from the news feed - in this case item.y:content_analysis - as the text to search for.

The For Each: Annotate module adds a new element to each feed item. The new element contains the first matching item from the Yahoo! Search. So if our first new item was "Pioneering treatment for brain cancer gets Swiss approval", then its y:content_analysis value, "brain cancer", becomes the Yahoo! Search module's search term. The first search result item is inserted into the original item as an element we name "xref".

Finally, we pipe the resulting feed through the Regex module, using data from the Yahoo! Search result to append the cross-reference title and link to the end of the original news feed's description element.

Module Input: items | Module Output: items

For Each: Annotate Module

The For Each: Annotate module merges data from two separate feeds. The first feed is piped into For Each: Annotate by wiring it to the connector at the top of the module.

The second source module is dragged from the modules palette directly into the "mini-canvas" (labeled "Drop source module here") inside the For Each: Annotate module. Drop the module when the mini-canvas border turns red. [Note: You cannot drag a module that's already on the main canvas into For Each: Annotate.]

This module has been replaced with the Loop module

Example: Run this Pipe | View Source

This example reads a feed and passes it through a Content Analysis module. This module tries to extract a few of the most meaningful words from the feed, adding those words in a new item element called y:content_analysis.

We pipe the resulting feed into a For Each: Annotate module. Inside this module we've embedded a Yahoo! Search source module. The Yahoo! Search module can search the internet for web pages that match search terms we provide. In our case, those search terms will come from the y:content_analysis element of each item in our first feed.

We configure For Each: Annotate to add a new element to each item from the first feed - we name that new element see_also. We select the item.y:content_analysis element as the "Search For" value inside Yahoo! Search, and we enter as the site restriction option.

What this gives us is a final feed where every news article from the first feed is annotated with a cross-reference to a related article on Wikipedia.

Module Input: items | Module Output: items

For Each: Replace Module

This module encloses a Source sub-module that is run once for each item in an input feed. Usually, you'll select a Source sub-module like Yahoo! Local, Flickr, or Google Base, that performs some kind of search based on input information. With For Each: Replace, that information comes from input feed.

Items output from the sub-module are passed to For Each: Replace's output feed. No items from the input feed are included in the output, the input feed is only used to drive the search performed by the sub-module.

For Each: Replace let's you choose to include all items from each sub-module search or only the first item. If you choose the all items option, and your input feed contains 10 items, and each sub-module search yields 8 results, the resulting feed will have 80 items. If you choose the first item option, you'll only get 10 items in the output feed.

This module has been replaced with the Loop module

Example: Run this Pipe | View Source

This example is for people who like to live, or at least dine, dangerously. Using data from the U.S. Geological Survey's RSS feed of recent earthquakes, this pipe uses For Each: Replace and an enclosed Yahoo! Local sub-module to find a restaurant near each quake's epicenter.

First, we fetch the USGS quake feed, then pass it through the Location Extractor module. This adds a y:location element to the feed, which we'll need further down the pipe.

We pipe this output into a For Each: Replace module, and then we drag a Yahoo! Local module into it as a sub-module. We configure For Each: Replace to return only the first item from each Yahoo! Local search.

Within the Yahoo! Local sub-module, we enter "restaurant" as the service we want to find, set the search radius to twenty miles, and then select item.y:location from the drop-down list as our target location. Notice how all the elements from the first feed are automatically available in the drop-down, including the y:location added by the Location Extractor module.

And since the output feed contains geolocation data, the Pipe Preview will even display all the restaurants on a convenient map.

Copyright © 2014 Yahoo! Inc. All rights reserved.