Exemplo n.º 1
0
 public void push(string name, doc_reader.doc.location dest)
 {
     try
     {
         links.Add(name, dest);
     }catch (ArgumentException e) {
         Console.WriteLine(e.Message + "  " + name);
     }
 }
Exemplo n.º 2
0
        public static link_map step2_each(doc_reader.doc doc, KeyValuePair<string, doc_reader.doc.location> link, Regex law_regex)
        {
            link_map ret = new link_map();

            MatchCollection mc= law_regex.Matches(doc.text);
            foreach(Match iter in mc)
            {
                doc_reader.doc.location match_at= new doc_reader.doc.location(doc.id, iter.Index, iter.Length);
                if (step2_flip(doc, match_at, iter))
                    ret.push(match_at, link.Value);

                //TODO push <XXX>XX章
            }
            return ret;
        }
Exemplo n.º 3
0
        public static link_map step2_each(doc_reader.doc doc, KeyValuePair <string, doc_reader.doc.location> link, Regex law_regex)
        {
            link_map ret = new link_map();

            MatchCollection mc = law_regex.Matches(doc.text);

            foreach (Match iter in mc)
            {
                doc_reader.doc.location match_at = new doc_reader.doc.location(doc.id, iter.Index, iter.Length);
                if (step2_flip(doc, match_at, iter))
                {
                    ret.push(match_at, link.Value);
                }

                //TODO push <XXX>XX章
            }
            return(ret);
        }
Exemplo n.º 4
0
 public void push(doc_reader.doc.location from, doc_reader.doc.location dest)
 {
     links.Add(from, dest);
 }
Exemplo n.º 5
0
 public static bool step2_flip(doc_reader.doc doc, doc_reader.doc.location match_at, Match _match)
 {
     //TODO 过滤
     return(true);
 }