【问题标题】:Wordlist -uima ruta单词表-uima ruta
【发布时间】:2016-05-20 07:51:44
【问题描述】:

实际上我在Wordlist中使用了一些CITY名称和PUBLISHERS名称。据我了解,Wordlist会注释文档中任何列表项的所有出现。但是我发现一个问题,当我更改时,出现次数增加或减少列表中文本的顺序。

例如:

脚本:

 WORDLIST CITYPUBLIST='CITYPUB.txt';
 DECLARE CITYPUB;
 Document{ -> MARKFAST(CITYPUB, CITYPUBLIST)};
 WORDLIST JournalNameLIST='JournalName.txt';
 DECLARE JournalName;
 Document{ -> MARKFAST(JournalName, JournalNameLIST)};

词汇表(CITYPUB.txt):

Arlington (VA): National Center for Education in Maternal and Child Health
[place unknown]: American Football Coaches Assn
[Bethesda (MD)]: The Institute
Chicago. Chicago: American Medical Association
Basil, Switzerland.Boston: MTB Press
St. Louis, MO. Washington: The Society
Chicago: University of Chicago Press

期刊名称.txt:

Jpn J Med Sci Biol
J Immunol
Lancet
Pharm Res Commun
Behav Neuropsychiatry
J Pharm Pharm Sci
Cochrane Database Syst Rev 

示例输入:

1.Lawrence RA. A review of the medical benefits and contraindications to breastfeeding in the United States [Internet] . Arlington (VA): National Center for Education in Maternal and Child Health; 1997 Oct [cited 2000 Apr 24]. p. 40. Available from: www.ncemch.org/pubs/PDFs/Welcometojungle.pdf.
2.Shishido A. Retraction notice: Effect of platinum compounds on murine lymphocyte mitogenesis [Retraction of Alsabti EA, Ghalib ON, Salem MH. In: Jpn J Med Biol 1979 Apr; 32(2):53-65]. Jpn J Med Sci Biol 1980 Aug;33(4):235-237.
3.Leist TP, Zinkernagel RM. Effects of treatment with IL-2 receptor specific monoclonal antibody in mice [letter] [Retraction of Leist TP, Kohler M, Eppler M, Zinkernagel RM. In: J Immunol 1989 Jul 15; 143(2): 628-32]. J Immunol 1990 Apr 1;144(7):2847.
4.Alsabti EA, Ghalib ON, Salem MH. Effect of platinum compounds on murine lymphocyte mitogenesis [Retracted by Shishido A. In: Jpn J Med Sci Biol 1980 Aug; 33(4):235-7]. Jpn J Med Sci Biol 1979 Apr;32(2):53-65.
5.Meyer, Beat; Hermanns, Karl. Formaldehyde release from pressed wood products. In: Turoski, Victor, editor. Formaldehyde: analytical chemistry and toxicology. Proceedings of the symposium at the 187th meeting of the American Chemical Society; 1984 Apr 8-13; St. Louis, MO. Washington: The Society; 1985. p. 101-116.
6.Magni F, Rossoni G, Berti F. BN-52021 protects guinea-pig from heard anaphylaxis. Pharm Res Commun 1988 Dec;20 Suppl 5:75-78.
7.Garvia EE, DeHaven ED. An experimental analysis of response acquisition and elimination with positive reinforcers. Behav Neuropsychiatry 1975 April-1976 Mar;7(1-12):71-78.
8.Mueller FO, Schindler RD. Annual survey of football injury research 1931-1985. [place unknown]: American Football Coaches Assn; 1986. 24 p.
9.Stern, Michael P. National Institute of Arthritis, Diabetes, and Digestive and Kidney Diseases. Diabetes in America: diabetes data compiled 1984. [Bethesda (MD)]: The Institute; 1985 Aug. Diabetes in Hispanic Americans. Chapter 9. (NIH publication; no. 86-1468).
10.Vivian, Valerie L, editor. Child abuse and neglect: a medical community response. 1st AMA National Conference on Child Abuse and Neglect; 1984 March 30-June 31; Chicago. Chicago: American Medical Association; 1985. 256 p.
11.Popper, Hans, et al., editors. Structural carbohydrates in the liver: proceedings of the 34th Falk Symposium; 1982 oct 12-19; Basil, Switzerland.Boston: MTB Press; 1983. 701 p.
12.Tidy JA, Parry GC, Ward P, Coleman DV, Peto J, Malcolm AD, Farrell PJ. High rate of papillomavirus type 16 infection in cytologically normal cervices [letter] [Retracted by Tidy J, Farrell PJ. In: Lancet 1989 Dec 23-30:2(8678-8679):1535]. Lancet 1989 Feb 25;1(8635):434.
13.Thomas Bernard, A Party for Boris, in Histrionics: Three Plays, trans. Peter K. Jansen and Kenneth Northcott (Chicago: University of Chicago Press, 1990).

当我测试它时,我得到了 CITYPUB(4)。如果我在列表项之前使用空行,我将收到 CITYPUB(5)。

提前致谢。

【问题讨论】:

  • 但是我没有收到其他单词列表的这个问题。所以我相信空行一定不能解决这个问题。

标签: uima ruta


【解决方案1】:

该文件很可能以字节顺序标记 (BOM) 开头。您可以检查是否有 BOM,例如使用 Notepad++ 吗? UIMA Ruta 中存在一个未解决的问题,目前不支持带有 BOM 的文件 (UIMA Ruta 2.4.0)。要么删除 BOM,要么在开头添加一个虚拟行(空行)。

(我是 UIMA Ruta 的开发者)

【讨论】:

  • 是的,彼得,我接受您的回答,但仍然发现“芝加哥。芝加哥:美国医学协会”和“芝加哥:芝加哥大学出版社”。我能知道为什么吗?
  • 类似地,对于 Journalname,它没有捕获 Jpn J Med Biol。
  • 如果我使用 J Med Biol 而不是 Jpn J Med Biol 它涵盖 J Med Biol。它有任何具体原因。
  • 未经测试的第一个快速猜测:可能是由空格引起的。尝试将其全部删除,或者激活配置参数dictRemoveWS。我会在接下来的几天里尝试重现你的问题
  • 条目以树结构(trie)转换,每个字符一个注释。当在单词列表中查找文本段落(标记组合)时,会跳过空白节点,因为它们通常在 Ruta 中不可见。如果不是,则条目对不同的空白组合将不具有鲁棒性,例如,文档中的两个空格与单词列表中的一个空格形成对比。如果跳过是可选的,但它仍然会导致问题,因为树中的查找没有回溯。
猜你喜欢
  • 2014-08-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-10-20
  • 2021-09-13
相关资源
最近更新 更多