예제 #1
0
        public virtual void  TestU()
        {
            TokenStream           stream  = new WhitespaceTokenizer(new System.IO.StringReader("Des mot clés À LA CHAÎNE À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï IJ Ð Ñ Ò Ó Ô Õ Ö Ø Œ Þ Ù Ú Û Ü Ý Ÿ à á â ã ä å æ ç è é ê ë ì í î ï ij ð ñ ò ó ô õ ö ø œ ß þ ù ú û ü ý ÿ fi fl"));
            ISOLatin1AccentFilter filter  = new ISOLatin1AccentFilter(stream);
            TermAttribute         termAtt = (TermAttribute)filter.GetAttribute(typeof(TermAttribute));

            AssertTermEquals("Des", filter, termAtt);
            AssertTermEquals("mot", filter, termAtt);
            AssertTermEquals("cles", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("LA", filter, termAtt);
            AssertTermEquals("CHAINE", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("A", filter, termAtt);
            AssertTermEquals("AE", filter, termAtt);
            AssertTermEquals("C", filter, termAtt);
            AssertTermEquals("E", filter, termAtt);
            AssertTermEquals("E", filter, termAtt);
            AssertTermEquals("E", filter, termAtt);
            AssertTermEquals("E", filter, termAtt);
            AssertTermEquals("I", filter, termAtt);
            AssertTermEquals("I", filter, termAtt);
            AssertTermEquals("I", filter, termAtt);
            AssertTermEquals("I", filter, termAtt);
            AssertTermEquals("IJ", filter, termAtt);
            AssertTermEquals("D", filter, termAtt);
            AssertTermEquals("N", filter, termAtt);
            AssertTermEquals("O", filter, termAtt);
            AssertTermEquals("O", filter, termAtt);
            AssertTermEquals("O", filter, termAtt);
            AssertTermEquals("O", filter, termAtt);
            AssertTermEquals("O", filter, termAtt);
            AssertTermEquals("O", filter, termAtt);
            AssertTermEquals("OE", filter, termAtt);
            AssertTermEquals("TH", filter, termAtt);
            AssertTermEquals("U", filter, termAtt);
            AssertTermEquals("U", filter, termAtt);
            AssertTermEquals("U", filter, termAtt);
            AssertTermEquals("U", filter, termAtt);
            AssertTermEquals("Y", filter, termAtt);
            AssertTermEquals("Y", filter, termAtt);
            AssertTermEquals("a", filter, termAtt);
            AssertTermEquals("a", filter, termAtt);
            AssertTermEquals("a", filter, termAtt);
            AssertTermEquals("a", filter, termAtt);
            AssertTermEquals("a", filter, termAtt);
            AssertTermEquals("a", filter, termAtt);
            AssertTermEquals("ae", filter, termAtt);
            AssertTermEquals("c", filter, termAtt);
            AssertTermEquals("e", filter, termAtt);
            AssertTermEquals("e", filter, termAtt);
            AssertTermEquals("e", filter, termAtt);
            AssertTermEquals("e", filter, termAtt);
            AssertTermEquals("i", filter, termAtt);
            AssertTermEquals("i", filter, termAtt);
            AssertTermEquals("i", filter, termAtt);
            AssertTermEquals("i", filter, termAtt);
            AssertTermEquals("ij", filter, termAtt);
            AssertTermEquals("d", filter, termAtt);
            AssertTermEquals("n", filter, termAtt);
            AssertTermEquals("o", filter, termAtt);
            AssertTermEquals("o", filter, termAtt);
            AssertTermEquals("o", filter, termAtt);
            AssertTermEquals("o", filter, termAtt);
            AssertTermEquals("o", filter, termAtt);
            AssertTermEquals("o", filter, termAtt);
            AssertTermEquals("oe", filter, termAtt);
            AssertTermEquals("ss", filter, termAtt);
            AssertTermEquals("th", filter, termAtt);
            AssertTermEquals("u", filter, termAtt);
            AssertTermEquals("u", filter, termAtt);
            AssertTermEquals("u", filter, termAtt);
            AssertTermEquals("u", filter, termAtt);
            AssertTermEquals("y", filter, termAtt);
            AssertTermEquals("y", filter, termAtt);
            AssertTermEquals("fi", filter, termAtt);
            AssertTermEquals("fl", filter, termAtt);
            Assert.IsFalse(filter.IncrementToken());
        }
예제 #2
0
		public virtual void  TestU()
		{
			TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader("Des mot clés À LA CHAÎNE À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï IJ Ð Ñ Ò Ó Ô Õ Ö Ø Œ Þ Ù Ú Û Ü Ý Ÿ à á â ã ä å æ ç è é ê ë ì í î ï ij ð ñ ò ó ô õ ö ø œ ß þ ù ú û ü ý ÿ fi fl"));
			ISOLatin1AccentFilter filter = new ISOLatin1AccentFilter(stream);
			TermAttribute termAtt = (TermAttribute) filter.GetAttribute(typeof(TermAttribute));
			AssertTermEquals("Des", filter, termAtt);
			AssertTermEquals("mot", filter, termAtt);
			AssertTermEquals("cles", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("LA", filter, termAtt);
			AssertTermEquals("CHAINE", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("A", filter, termAtt);
			AssertTermEquals("AE", filter, termAtt);
			AssertTermEquals("C", filter, termAtt);
			AssertTermEquals("E", filter, termAtt);
			AssertTermEquals("E", filter, termAtt);
			AssertTermEquals("E", filter, termAtt);
			AssertTermEquals("E", filter, termAtt);
			AssertTermEquals("I", filter, termAtt);
			AssertTermEquals("I", filter, termAtt);
			AssertTermEquals("I", filter, termAtt);
			AssertTermEquals("I", filter, termAtt);
			AssertTermEquals("IJ", filter, termAtt);
			AssertTermEquals("D", filter, termAtt);
			AssertTermEquals("N", filter, termAtt);
			AssertTermEquals("O", filter, termAtt);
			AssertTermEquals("O", filter, termAtt);
			AssertTermEquals("O", filter, termAtt);
			AssertTermEquals("O", filter, termAtt);
			AssertTermEquals("O", filter, termAtt);
			AssertTermEquals("O", filter, termAtt);
			AssertTermEquals("OE", filter, termAtt);
			AssertTermEquals("TH", filter, termAtt);
			AssertTermEquals("U", filter, termAtt);
			AssertTermEquals("U", filter, termAtt);
			AssertTermEquals("U", filter, termAtt);
			AssertTermEquals("U", filter, termAtt);
			AssertTermEquals("Y", filter, termAtt);
			AssertTermEquals("Y", filter, termAtt);
			AssertTermEquals("a", filter, termAtt);
			AssertTermEquals("a", filter, termAtt);
			AssertTermEquals("a", filter, termAtt);
			AssertTermEquals("a", filter, termAtt);
			AssertTermEquals("a", filter, termAtt);
			AssertTermEquals("a", filter, termAtt);
			AssertTermEquals("ae", filter, termAtt);
			AssertTermEquals("c", filter, termAtt);
			AssertTermEquals("e", filter, termAtt);
			AssertTermEquals("e", filter, termAtt);
			AssertTermEquals("e", filter, termAtt);
			AssertTermEquals("e", filter, termAtt);
			AssertTermEquals("i", filter, termAtt);
			AssertTermEquals("i", filter, termAtt);
			AssertTermEquals("i", filter, termAtt);
			AssertTermEquals("i", filter, termAtt);
			AssertTermEquals("ij", filter, termAtt);
			AssertTermEquals("d", filter, termAtt);
			AssertTermEquals("n", filter, termAtt);
			AssertTermEquals("o", filter, termAtt);
			AssertTermEquals("o", filter, termAtt);
			AssertTermEquals("o", filter, termAtt);
			AssertTermEquals("o", filter, termAtt);
			AssertTermEquals("o", filter, termAtt);
			AssertTermEquals("o", filter, termAtt);
			AssertTermEquals("oe", filter, termAtt);
			AssertTermEquals("ss", filter, termAtt);
			AssertTermEquals("th", filter, termAtt);
			AssertTermEquals("u", filter, termAtt);
			AssertTermEquals("u", filter, termAtt);
			AssertTermEquals("u", filter, termAtt);
			AssertTermEquals("u", filter, termAtt);
			AssertTermEquals("y", filter, termAtt);
			AssertTermEquals("y", filter, termAtt);
			AssertTermEquals("fi", filter, termAtt);
			AssertTermEquals("fl", filter, termAtt);
			Assert.IsFalse(filter.IncrementToken());
		}
		public virtual void  TestU()
		{
			TokenStream stream = new WhitespaceTokenizer(new System.IO.StringReader("Des mot clés À LA CHAÎNE À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Œ Þ Ù Ú Û Ü Ý Ÿ à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø œ ß þ ù ú û ü ý ÿ"));
			ISOLatin1AccentFilter filter = new ISOLatin1AccentFilter(stream);
			Assert.AreEqual("Des", filter.Next().TermText());
			Assert.AreEqual("mot", filter.Next().TermText());
			Assert.AreEqual("cles", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("LA", filter.Next().TermText());
			Assert.AreEqual("CHAINE", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("A", filter.Next().TermText());
			Assert.AreEqual("AE", filter.Next().TermText());
			Assert.AreEqual("C", filter.Next().TermText());
			Assert.AreEqual("E", filter.Next().TermText());
			Assert.AreEqual("E", filter.Next().TermText());
			Assert.AreEqual("E", filter.Next().TermText());
			Assert.AreEqual("E", filter.Next().TermText());
			Assert.AreEqual("I", filter.Next().TermText());
			Assert.AreEqual("I", filter.Next().TermText());
			Assert.AreEqual("I", filter.Next().TermText());
			Assert.AreEqual("I", filter.Next().TermText());
			Assert.AreEqual("D", filter.Next().TermText());
			Assert.AreEqual("N", filter.Next().TermText());
			Assert.AreEqual("O", filter.Next().TermText());
			Assert.AreEqual("O", filter.Next().TermText());
			Assert.AreEqual("O", filter.Next().TermText());
			Assert.AreEqual("O", filter.Next().TermText());
			Assert.AreEqual("O", filter.Next().TermText());
			Assert.AreEqual("O", filter.Next().TermText());
			Assert.AreEqual("OE", filter.Next().TermText());
			Assert.AreEqual("TH", filter.Next().TermText());
			Assert.AreEqual("U", filter.Next().TermText());
			Assert.AreEqual("U", filter.Next().TermText());
			Assert.AreEqual("U", filter.Next().TermText());
			Assert.AreEqual("U", filter.Next().TermText());
			Assert.AreEqual("Y", filter.Next().TermText());
			Assert.AreEqual("Y", filter.Next().TermText());
			Assert.AreEqual("a", filter.Next().TermText());
			Assert.AreEqual("a", filter.Next().TermText());
			Assert.AreEqual("a", filter.Next().TermText());
			Assert.AreEqual("a", filter.Next().TermText());
			Assert.AreEqual("a", filter.Next().TermText());
			Assert.AreEqual("a", filter.Next().TermText());
			Assert.AreEqual("ae", filter.Next().TermText());
			Assert.AreEqual("c", filter.Next().TermText());
			Assert.AreEqual("e", filter.Next().TermText());
			Assert.AreEqual("e", filter.Next().TermText());
			Assert.AreEqual("e", filter.Next().TermText());
			Assert.AreEqual("e", filter.Next().TermText());
			Assert.AreEqual("i", filter.Next().TermText());
			Assert.AreEqual("i", filter.Next().TermText());
			Assert.AreEqual("i", filter.Next().TermText());
			Assert.AreEqual("i", filter.Next().TermText());
			Assert.AreEqual("d", filter.Next().TermText());
			Assert.AreEqual("n", filter.Next().TermText());
			Assert.AreEqual("o", filter.Next().TermText());
			Assert.AreEqual("o", filter.Next().TermText());
			Assert.AreEqual("o", filter.Next().TermText());
			Assert.AreEqual("o", filter.Next().TermText());
			Assert.AreEqual("o", filter.Next().TermText());
			Assert.AreEqual("o", filter.Next().TermText());
			Assert.AreEqual("oe", filter.Next().TermText());
			Assert.AreEqual("ss", filter.Next().TermText());
			Assert.AreEqual("th", filter.Next().TermText());
			Assert.AreEqual("u", filter.Next().TermText());
			Assert.AreEqual("u", filter.Next().TermText());
			Assert.AreEqual("u", filter.Next().TermText());
			Assert.AreEqual("u", filter.Next().TermText());
			Assert.AreEqual("y", filter.Next().TermText());
			Assert.AreEqual("y", filter.Next().TermText());
			Assert.IsNull(filter.Next());
		}