/encog-core-silverlight/encog-core-silverlight/Bot/Browse/Extract/IExtract.cs
C# | 75 lines | 15 code | 6 blank | 54 comment | 0 complexity | 911f5a494d860178594f87330ef03940 MD5 | raw file
- // Encog(tm) Artificial Intelligence Framework v2.5
- // .Net Version
- // http://www.heatonresearch.com/encog/
- // http://code.google.com/p/encog-java/
- //
- // Copyright 2008-2010 by Heaton Research Inc.
- //
- // Released under the LGPL.
- //
- // This is free software; you can redistribute it and/or modify it
- // under the terms of the GNU Lesser General Public License as
- // published by the Free Software Foundation; either version 2.1 of
- // the License, or (at your option) any later version.
- //
- // This software is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- // Lesser General Public License for more details.
- //
- // You should have received a copy of the GNU Lesser General Public
- // License along with this software; if not, write to the Free
- // Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- // 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- //
- // Encog and Heaton Research are Trademarks of Heaton Research, Inc.
- // For information on Heaton Research trademarks, visit:
- //
- // http://www.heatonresearch.com/copyright.html
-
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
-
- namespace Encog.Bot.Browse.Extract
- {
- /// <summary>
- /// Provides the basic interface that any extractor must support. An extractor is
- /// a class that is capable of extracting certain types of data from web data.
- /// For example, the ExtractWords extractor is used to extract all of the words
- /// from a web page.
- /// </summary>
- public interface IExtract
- {
- /// <summary>
- /// Add a listener for the extraction.
- /// </summary>
- /// <param name="listener">The listener to add.</param>
- void AddListener(IExtractListener listener);
-
- /// <summary>
- /// Extract data from the web page.
- /// </summary>
- /// <param name="page">The page to extract from.</param>
- void Extract(WebPage page);
-
- /// <summary>
- /// Extract from the web page and return the results as a list.
- /// </summary>
- /// <param name="page">The web page to extract from.</param>
- /// <returns>The results of the extraction as a List.</returns>
- IList<Object> ExtractList(WebPage page);
-
- /// <summary>
- /// A list of listeners registered with this object.
- /// </summary>
- ICollection<IExtractListener> Listeners{ get; }
-
- /// <summary>
- /// Remove the specified listener.
- /// </summary>
- /// <param name="listener">The listener to rmove.</param>
- void RemoveListener(IExtractListener listener);
- }
- }