Click here to Skip to main content
15,896,063 members
Articles / Web Development / ASP.NET

Searcharoo 2007 (Medium Trust and Office 2007 indexing)

Rate me:
Please Sign up or sign in to vote.
4.95/5 (11 votes)
28 Apr 2007CPOL10 min read 205.1K   849   42  
Remove Binary Serialization to solve Medium Trust problem; index OpenXML document formats in ASP.NET/C# free search engine
using System;

namespace Searcharoo.Common
{
    /// <summary>
    /// No-op - if Go Words are disabled this class will be used.
    /// </summary>
    public class NoGoWord : IGoWord
    {
        public bool IsGoWord(string word)
        {
            return false;
        }
    }
    /// <summary>
    /// List of Go words in a switch statement; feel free to
    /// add additional words to this list. 
    /// </summary>
    public class ListGoWord : IGoWord
    {
        public bool IsGoWord(string word)
        {
            switch (word.ToLower())
            {
                case "c#":
                case "vb.net":
                case "asp.net":
                    return true;
                //					break;
            }
            return false;
        }
    }
    /// <summary>
    /// TODO: implement a Go Word method that will read in the word list
    /// from a file. 
    /// http://snowball.tartarus.org/algorithms/english/stop.txt
    /// </summary>
    [Obsolete("well, not obsolete, just not written yet")]
    public class FileGoWord : IGoWord
    {
        /// <summary>
        /// Because this method will use an intelligent list to filter
        /// out stop words, it probably won't need to inherit from the
        /// dodgy implementations above.
        /// </summary>
        public bool IsGoWord(string word)
        {
            throw new NotImplementedException();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Australia Australia
-- ooo ---
www.conceptdevelopment.net
conceptdev.blogspot.com
www.searcharoo.net
www.recipenow.net
www.racereplay.net
www.silverlightearth.com

Comments and Discussions