PageRenderTime 28ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/encog-core-silverlight/encog-core-silverlight/Bot/Browse/Extract/IExtract.cs

http://encog-cs.googlecode.com/
C# | 75 lines | 15 code | 6 blank | 54 comment | 0 complexity | 911f5a494d860178594f87330ef03940 MD5 | raw file
  1. // Encog(tm) Artificial Intelligence Framework v2.5
  2. // .Net Version
  3. // http://www.heatonresearch.com/encog/
  4. // http://code.google.com/p/encog-java/
  5. //
  6. // Copyright 2008-2010 by Heaton Research Inc.
  7. //
  8. // Released under the LGPL.
  9. //
  10. // This is free software; you can redistribute it and/or modify it
  11. // under the terms of the GNU Lesser General Public License as
  12. // published by the Free Software Foundation; either version 2.1 of
  13. // the License, or (at your option) any later version.
  14. //
  15. // This software is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. // Lesser General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU Lesser General Public
  21. // License along with this software; if not, write to the Free
  22. // Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  23. // 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  24. //
  25. // Encog and Heaton Research are Trademarks of Heaton Research, Inc.
  26. // For information on Heaton Research trademarks, visit:
  27. //
  28. // http://www.heatonresearch.com/copyright.html
  29. using System;
  30. using System.Collections.Generic;
  31. using System.Linq;
  32. using System.Text;
  33. namespace Encog.Bot.Browse.Extract
  34. {
  35. /// <summary>
  36. /// Provides the basic interface that any extractor must support. An extractor is
  37. /// a class that is capable of extracting certain types of data from web data.
  38. /// For example, the ExtractWords extractor is used to extract all of the words
  39. /// from a web page.
  40. /// </summary>
  41. public interface IExtract
  42. {
  43. /// <summary>
  44. /// Add a listener for the extraction.
  45. /// </summary>
  46. /// <param name="listener">The listener to add.</param>
  47. void AddListener(IExtractListener listener);
  48. /// <summary>
  49. /// Extract data from the web page.
  50. /// </summary>
  51. /// <param name="page">The page to extract from.</param>
  52. void Extract(WebPage page);
  53. /// <summary>
  54. /// Extract from the web page and return the results as a list.
  55. /// </summary>
  56. /// <param name="page">The web page to extract from.</param>
  57. /// <returns>The results of the extraction as a List.</returns>
  58. IList<Object> ExtractList(WebPage page);
  59. /// <summary>
  60. /// A list of listeners registered with this object.
  61. /// </summary>
  62. ICollection<IExtractListener> Listeners{ get; }
  63. /// <summary>
  64. /// Remove the specified listener.
  65. /// </summary>
  66. /// <param name="listener">The listener to rmove.</param>
  67. void RemoveListener(IExtractListener listener);
  68. }
  69. }