Filter Call


Service Call:
http://api.semantichacker.com/TOKEN/filter[/FilterID]?

Overview

The filter call attempts to 'filter' out useless text from the indicated content. What text is produced varies depending on the filter algorithm used. The filter call is an external call to the same functions used when the 'filter' parameter is provided for other API calls. It can be very useful to "see" what text out of some content page is actually be utilized by the underlying Semantic Signature® technology. The following table details the available algorithms:

Name Filter ID Description
HTML html Removes all HTML markup from the provided input. This is a simple algorithm that only removes the HTML tags for the purpose of returning the text contained within. External resources specified within any HTML markup or routines that dynamically add content will not be processed. This process does not guarantee that all text appearing on a page as rendered in a browser will be produced in the output of this call.
Web Page web Web pages often have different sections of text on them besides the page's main topic, such as advertisements, links, headers, footers, etc. The Web Page filter uses an advanced algorithm that looks at each text block on the page and attempts to identify the text segments that contain the page's main subject text. This filter often does a much better job of finding the 'useful' text from web pages than the simple HTML filter.
Plain Text text 'Cleans up' plain text by removing extra whitespace, foreign characters, etc.
Wiki wp Produces useful subject text from MediaWiki formatted text.

The desired filter type used is specified in the call by adding its identifier to the end of the request path. Although the filter ID is not required, it is highly recommended for each call to include the filter ID. If not provided, the filter used will be selected by looking at several properties of the API request made. The method of indicating content, URI, parameter, or upload, as well as the 'Content-Type' header will be utilized to determine the proper filter.

The filter call can be used to see the final text that would be used as input when using other TextWise API calls. To use a filter type other then the default, be sure to include the 'filter' parameter with the request for any call.

Besides the common request parameters, the filter call currently does not have any other request parameters.

The filter call supports the 'xml' and 'json' output formats.

Examples

http://api.semantichacker.com/TOKEN/filter/web?uri=http://www.linux.org

	<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.semantichacker.com/api">
	<about>
		<requestId>A76237286D8F91D26F2BB3AD34A915BB</requestId>
		<docId>42FF363F623BD786D0356F66F70F3B55</docId>
		<systemType>filter</systemType>
		<configId>odp_2007_l1_1.7k</configId>
		<contentType>text/html</contentType>
		<contentDigest>758F0A519C805D0899DB3926444181E1</contentDigest>
		<requestDate>2008-10-13T15:43:03+0000</requestDate>
		<systemVersion>2.0</systemVersion>
		<sourceUri>http://www.linux.org</sourceUri>
	</about>
	<filter>
		<filterResponse>
			<filteredTextLength>1893</filteredTextLength>
			<filteredText>The Linux Home Page at Linux Online .
 Linux is a free Unix-type operating system originally created by Linus Torvalds
with the assistance of developers around the world. Developed under the GNU 
General Public License , the source code for Linux is freely available to everyone.
Click on the link below to find out more about the operating system that is causing
a revolution in the world of computers. For coverage of the SCO vs. IBM case, 
consult our SCO section
 .
 The Linux kernel provides the basic services and device drivers used by all other
programs running on a Linux OS system. The latest kernels available are: 
 .
 Do you have an old PC that you're thinking of parting with? Before you
send it to the landfill, you may want to pick up a copy of The Official Damn Small
Linux Book . In it, you'll find out all you need to know to give your old
hardware a new lease on life. For more information, we invite you to read a review
of this definitive book on this popular minimalist version of Linux. Are you thinking
about switching to Linux and want to learn how to use it? Have you been using 
Linux for some time and want to learn even more? Then Linux Online's 
classroom can help! Three courses - one for beginners, another for intermediate
level users and an advanced level course - are available to our visitors free of
charge. What's stopping you from learning more about Linux?
 .
 Linux Online is a community supported web site. We need the help of visitors,
like you, to pay the day to day costs of operating this site . This is your
opportunity to support the Linux community by making a donation to the most
popular Linux resource on the net! We have a number of exciting gifts for specific
amounts but any donation is graciously accepted! You can use PayPal,
Visa, Mastercard, Amex, Discover or regular mail to help us build the most
comprehensive Linux resource available!
 .
</filteredText>
		</filterResponse>
	</filter>
</response>

http://api.semantichacker.com/TOKEN/filter/html?uri=http://www.java.sun.com

	<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.semantichacker.com/api">
	<about>
		<requestId>A85F14D0CFEE08105FFD08B5D62A2858</requestId>
		<docId>4D2584BA32883896A2F484C9CA878B22</docId>
		<systemType>filter</systemType>
		<configId>odp_2007_l1_1.7k</configId>
		<contentType>text/html</contentType>
		<contentDigest>BEC5DAC31EFBA62EA68450C904AEBB2D</contentDigest>
		<requestDate>2008-10-13T15:47:30+0000</requestDate>
		<systemVersion>2.0</systemVersion>
		<sourceUri>http://www.java.sun.com</sourceUri>
	</about>
	<filter>
		<filterResponse>
			<filteredTextLength>5227</filteredTextLength>
			<filteredText>&quot;Java&quot;
&quot;platform&quot;
&quot;Web&quot;
&quot;Web 2.0&quot;
&quot;developers&quot;
&quot;JVM&quot;
&quot;Java SE&quot;
&quot;J2SE&quot;
&quot;Java EE&quot;
&quot;J2EE&quot;
&quot;Java ME&quot;
&quot;J2ME&quot;
&quot;JavaFX&quot;
&quot;NetBeans&quot;
&quot;MySQL&quot;
&quot;GlassFish&quot;
&quot;JavaDB&quot;
&quot;Java DB&quot;
&quot;desktop&quot;
&quot;embedded&quot;
&quot;mobile&quot;
&quot;mobility&quot;
&quot;wireless&quot;
&quot;micro&quot;
&quot;enterprise&quot;
&quot;database&quot;
&quot;James Gosling&quot;
&quot;Jonathan Schwartz&quot;
&quot;open source&quot;
&quot;open-source&quot;
&quot;community&quot;
&quot;resources&quot;
&quot;code&quot;
&quot;code samples&quot;
&quot;API&quot;
&quot;APIs&quot;
&quot;API&apos;s&quot;
&quot;docs&quot;
&quot;documentation&quot;
&quot;student&quot;
&quot;students&quot;
&quot;bug&quot;
&quot;bugs&quot;
&quot;training&quot;
&quot;certification&quot;
&quot;training and certification&quot;
&quot;time zone&quot;
&quot;timezone&quot;
&quot;videos&quot;
&quot;tutorials&quot;
&quot;compiler&quot;
&quot;compilers&quot;
&quot;Solaris&quot;
&quot;free&quot;
&quot;FOSS&quot;
&quot;podcast&quot;
&quot;multimedia&quot;
&quot;web services&quot;
&quot;blogs&quot;
&quot;Tech Days&quot;
&quot;OpenJDK&quot;
&quot;OpenSolaris&quot;
&quot;Mobile &amp; Embedded&quot;
&quot;OpenJFX&quot;
&quot;forums&quot;
&quot;newsletters&quot;
&quot;user groups&quot;
&quot;java.net&quot;
&quot;ask the experts&quot;
&quot;network&quot;
&quot;network is the computer&quot;
&quot;networks&quot;
&quot;Sun&quot;
&quot;Sun Microsystems&quot;
&quot;news&quot;
&quot;software&quot;
&quot;support&quot;
&quot;articles&quot;
&quot;solutions&quot;
&quot;events&quot;
&quot;scripting&quot;
&quot;Ruby&quot;
&quot;JRuby&quot;
&quot;Rails&quot;
&quot;Gems&quot;
&quot;products&quot;
&quot;participate&quot;
&quot;the network is the computer&quot;
&quot;Whether you&apos;re creating software for mobile devices, desktops,
enterprise systems, the Internet, or games, java.sun.com gets you what you need:
code samples, developer tools, downloads, open-source projects, resource centers,
and support.&quot;.
Developer Resources for Java Technology Skip to Content Sun Java Solaris Communities
My SDN Account Join SDN   search tips APIs Downloads Products Support Training
Participate Developers Home  Products &amp; Technologies 
Java.sun.com The Source for Java Developers Featured Content October 9, 2008
Enterprise Tech Tip: Securing Attachments With Metro 1.3 Learn about Metro, a
high performance, extensible, easy-to-use web services stack that combines the
JAX-WS reference implementation with Project Tango. October 7, 2008 Project
Wonderland With Project Wonderland&apos;s toolkit of open-source software,
you can create 3D virtual worlds where people can collaborate, conduct real
business, and learn through immersive media.
October 2, 2008 Blu-ray Disc Application Development Developer Bruce Hopkins walks
you through a complete working example of how to a create BD-J application that works
on any Blu-ray Disc player, using Java ME, with part 2 to follow.   See All Articles
Newsletters and Tips     News and Updates     Videos Developer Spotlight Voice Your
Opinion: 2008 Presidential Election Who will win the 2008 U.S. presidential
election? Voice your opinion on the issues and participate in discussions. This
game, available on both Facebook and MySpace, is built and deployed on zembly ,
Sun&apos;s new browser-based social application development environment.
Sun xVM Virtualization Portfolio Check out the only open solution spanning
virtualization and management for new generation desktops and datacenters. Java
Learning and Certification Young Developers Programming is not just for adults
anymore! The Young Developer Series teaches Java programming to anyone over 10
years of age, using a tool called Greenfoot: Wombat Object Basics Wombat Classes
Basics EJB 3.0 Technology Update Workshop Are you an experienced EJB developer
looking to migrate to EJB 3.0? Check out this new workshop.
Certification Success Packages It&apos;s easy to prepare for certification
with packages that include training, practice exams and certification exam vouchers.
All-in-one packages can save you up to 25%.
  New to Java     Tutorials     Certification     Training     Students     
See All From the Blogosphere Ken Saks on Portable Global JNDI Names EJB component
developers: Here&apos;s a new way to deal with session bean global JNDI names.
Using the Java Deployment Toolkit With JavaFX Applets Jim Weaver explains how to
use the toolkit to easily deploy applets and applications to a large variety of 
clients.
  Blogs     Blogs.sun.com     Java.net Blogs Participate Developer Forums Ask a
question or offer expertise on Sun&apos;s developer forums. SDN Share SDN Share
is the place to submit technical tips, code samples, or articles. Interact with
peers through voting and comments. Sun Open Sources Java Platform Implementations
Get involved! New Communities: OpenJDK Mobile &amp; Embedded GlassFish OpenJFX
Forums     Ask the Experts     User Groups     See All Want to Learn Java Technology?
New to Java Programming Center Young Developers Educators Popular Downloads: 
Java SE Java EE 5 SDK Java ME NetBeans IDE MySQL Web Services See All Technologies: 
Java SE Java EE Java ME JavaFX Web Services See All Resources: Code Samples &amp; 
Apps APIs Documentation Tutorials Videos Timezone Updates Student Developers 
Developer Training Bug Database Java Blueprints Solaris C/C++/Fortran Compilers 
Communities: OpenJDK Mobile &amp; Embedded GlassFish OpenJFX NetBeans java.net
Java Community Process SDN Share Related Resources: Open-Source Java Project Web
Developer Resource Center java.com About Sun   About This Site   Newsletters   
Contact Us   Employment How to Buy   Licensing   Terms of Use   Privacy  Trademarks
Sun Microsystems, Inc.
A Sun Developer Network Site Unless otherwise licensed, code in all technical
manuals herein (including articles, FAQs, samples) is provided under this License .
Sun Developer RSS Feeds 
</filteredText>
		</filterResponse>
	</filter>
</response>