コード例 #1
0
 protected static void ClassCleanup()
 {
     Combiner = null;
     Changer  = null;
     Tagger?.Dispose();
     Tagger = null;
 }
コード例 #2
0
        protected static void ClassInitialize(TestContext context)
        {
            var dir     = Path.GetDirectoryName(typeof(BaseClass).Assembly.Location);
            var dic_dir = Path.Combine(dir, "UniDic-CWJ");

            Tagger = Tagger <WNode> .Create(() => new WNode(), dic_dir);

            Changer  = new LanguageStyleChanger(Tagger);
            Combiner = new TokenCombiner <WNode>(n => n.Surface, n => n.RLength != n.Length);
        }
コード例 #3
0
        public void Test_Combine_postprocess_02_0064()
        {
            var result = TokenCombiner.Combine("}、{", postprocess: TokenCombiner.FullWidthParentheses);

            Assert.AreEqual("}、{", result, "Unexpected combined text.");
        }
コード例 #4
0
        public void Test_Combine_postprocess_01_0003()
        {
            var result = TokenCombiner.Combine("a[b]c", postprocess: TokenCombiner.AsciiParentheses);

            Assert.AreEqual("a [b] c", result, "Unexpected combined text.");
        }
コード例 #5
0
        public void Test_Combine_postprocess_00_0064()
        {
            var result = TokenCombiner.Combine("}、{", postprocess: null);

            Assert.AreEqual("}、{", result, "Unexpected combined text.");
        }