NEAR条件中的数字在ruta脚本中表示什么?

时间:2016-05-24 13:17:36

标签: uima ruta

我使用以下脚本查找列表项;

脚本:

SuspectedList{NEAR(SuspectedList,1,5)->MARK(DZP_List)};
SuspectedList{-PARTOF(DZP_List),NEAR(SuspectedList,1,5,false)->MARK(DZP_List)};

SuspectedList包含标题和列表项,我试图仅使用NEAR条件提取列表项并将其标记为DZP_List。

输入:

<para113>43. The Cyrus Legend (ca. 580 BCE)</para113>
<para114>[Insert image ML38 with caption: A fifteenth-century French manuscript depicts the dream of Astyages, in which a great vine grew from the womb of Mandane, the mother of Cyrus.]</para114>
<para115>After the destruction of the Assyrian Empire at the end of the seventh century BCE by the Medes and Chaldeans, the Medes established a powerful kingdom that extended from Iran to central Anatolia. At this time the Persians, even though they had kings of their own, were vassals of the Medes. In the mid sixth century, the Persian Cyrus, a descendent of the Persian royal family, led a revolt against the Medes and founded the Persian Empire. As was the case with many important persons of antiquity, legends grew up about Cyrus’ origins, such as this tale related in the mid fifth century BCE by the Greek historian Herodotus. In this case, there was a common folk tale motif of the noble child raised in disguise, much as in the legends of Romulus and Remus (Reading 10.1 below) and King Arthur. </para115>
<para130>44. The Behistun Inscription (ca. 520 BCE)</para130>
<para131>[Insert image ML39 with caption: The Behistun inscription, carved into a cliffside on Mount Behistun near Kermanshah in western Iran, describes the rise to power of the Persian king Darius I.]</para131>
<para132>In order to get the news out about important events during their reigns, Persian kings had huge rock reliefs carved onto the sides of cliffs. For Darius I (522–486 BCE), the most important event of his reign was the very first, his proclamation as Great King, which occurred under somewhat irregular circumstances. Although Darius was, or at least claimed to be, a direct descendent of the first Persian king Achaemenes, he was only a distant cousin of Cyrus, the founder of the Persian Empire. It therefore was crucially important that he establish his legitimacy, and one of the means he employed to do this was the creation of this rock carving that told the story of his rise to power. It not only depicted him fully enthroned as king but also had an accompanying inscription, written in Persian, Babylonian, and Elamite. The account contained in a massive inscription carved into the side of Mount Behistun in Iran is very candid about the problems that Darius had establishing his control over the empire, and, in typical near eastern fashion, attributes his legitimacy to the support of a god, in this case Ahura Mazda, the primary god of the Zoroastrian religion. It provides in excruciating detail accounts, with exact places and dates, of the battles that Darius fought in his quest to secure the throne.</para132>
<para133>Source: L.W. King, R.C. Thompson, The Sculptures and Inscription of Darius the Great on the Rock of Behistûn in Persia (London, 1907).</para133>
<para135>(1) I am Darius, the Great King, King of Kings, the King of Persia, the king of countries, the son of Hystaspes, the grandson of Arsames, the Achaemenid.</para135>
<para136>(2) King Darius says: My father is Hystaspes; the father of Hystaspes was Arsames; the father of Arsames was Ariaramnes; the father of Ariaramnes was Teispes; the father of Teispes was Achaemenes. </para136>
<para137>(3) King Darius says: That is why we are called Achaemenids; from antiquity we have been noble; from antiquity has our dynasty been royal.</para137>
<para138>(4) King Darius says: Eight of my dynasty were kings before me; I am the ninth. Nine in succession we have been kings.</para138>
<para139>(5) King Darius says: By the grace of Ahura Mazda am I king; Ahura Mazda has granted me the kingdom.</para139>
<para140>(6) King Darius says: These are the countries that are subject unto me, and by the grace of Ahura Mazda I became king of them: Persia, Elam, Babylonia, Assyria, Arabia, Egypt, the countries by the Sea, Lydia, the Greeks, Media, Armenia, Cappadocia, Parthia, Drangiana, Aria, Chorasmia, Bactria, Sogdia, Gandara, Scythia, Sattagydia, Arachosia and Maka; twenty-three lands in all.</para140>
<para141>(7) King Darius says: These are the countries that are subject to me; by the grace of Ahura Mazda they became subject to me; they brought tribute unto me. Whatsoever commands have been laid on them by me, by night or by day, have been performed by them.</para141>
<para142>(8) King Darius says: Within these lands, whosoever was a friend, him have I surely protected; whosoever was hostile, him have I utterly destroyed. By the grace of Ahura Mazda these lands have conformed to my decrees; as it was commanded unto them by me, so was it done.</para142>
<para143>(9) King Darius says: Ahura Mazda has granted unto me this empire. Ahura Mazda brought me help, until I gained this empire; by the grace of Ahura Mazda do I hold this empire.</para143>
<para144>(10) King Darius says: The following is what was done by me after I became king. A son of Cyrus, named Cambyses, one of our dynasty, was king here before me. That Cambyses had a brother, Smerdis by name, of the same mother and the same father as Cambyses. Afterward, Cambyses slew this Smerdis. When Cambyses slew Smerdis, it was not known unto the people that Smerdis was slain. Thereupon Cambyses went to Egypt. When Cambyses had departed into Egypt, the people became hostile, and the lie multiplied in the land, even in Persia and Media, and in the other provinces.</para144>
<para145>(11) King Darius says: Afterward, there was a certain man, a Magian, Gaumâta by name, who raised a rebellion in Paishiyâuvâdâ, in a mountain called Arakadriš. On the fourteenth day of the month Viyaxana did he rebel. He lied to the people, saying: “I am Smerdis, the son of Cyrus, the brother of Cambyses.’ Then were all the people in revolt, and from Cambyses they went over unto him, both Persia and Media, and the other provinces. He seized the kingdom; on the ninth day of the month Garmapada he seized the kingdom. Afterward, Cambyses died of natural causes. </para145>
<para146>(12) King Darius says: The kingdom of which Gaumâta, the Magian, dispossessed Cambyses, had always belonged to our dynasty. After that Gaumâta, the Magian, had dispossessed Cambyses of Persia and Media, and of the other provinces, he did according to his will. He became king. </para146>
<para147> (13) King Darius says: There was no man, either Persian or Mede or of our own dynasty, who took the kingdom from Gaumâta, the Magian. The people feared him exceedingly, for he slew many who had known the real Smerdis. For this reason did he slay them, “that they may not know that I am not Smerdis, the son of Cyrus.’ There was none who dared to act against Gaumâta, the Magian, until I came. Then I prayed to Ahura Mazda; Ahura Mazda brought me help. On the tenth day of the month Bâgayâdiš I, with a few men, slew that Gaumâta, the Magian, and the chief men who were his followers. At the stronghold called Sikayauvatiš, in the district called Nisaia in Media, I slew him; I dispossessed him of the kingdom. By the grace of Ahura Mazda I became king; Ahura Mazda granted me the kingdom.</para147>
<para148>(14) King Darius says: The kingdom that had been wrested from our line I brought back and I reestablished it on its foundation. The temples that Gaumâta, the Magian, had destroyed, I restored to the people, and the pasture lands, and the herds and the dwelling places, and the houses that Gaumâta, the Magian, had taken away. I settled the people in their place, the people of Persia, and Media, and the other provinces. I restored that which had been taken away, as it was in the days of old. This did I by the grace of Ahura Mazda, I labored until I had established our dynasty in its place, as in the days of old; I labored, by the grace of Ahura Mazda, so that Gaumâta, the Magian, did not dispossess our house.</para148>
<para149>(15) King Darius says: This was what I did after I became king.</para149>

SuspectedList:

43. The Cyrus Legend (ca. 580 BCE)
44. The Behistun Inscription (ca. 520 BCE)
(1) I am Darius, the Great King, King of Kings, the King of Persia, the king of countries, the son of Hystaspes, the grandson of Arsames, the Achaemenid.
(2) King Darius says: My father is Hystaspes; the father of Hystaspes was Arsames; the father of Arsames was Ariaramnes; the father of Ariaramnes was Teispes; the father of Teispes was Achaemene.
(3) King Darius says: That is why we are called Achaemenids; from antiquity we have been noble; from antiquity has our dynasty been royal.
(4) King Darius says: Eight of my dynasty were kings before me; I am the ninth. Nine in succession we have been kings.
(5) King Darius says: By the grace of Ahura Mazda am I king; Ahura Mazda has granted me the kingdom.
(6) King Darius says: These are the countries that are subject unto me, and by the grace of Ahura Mazda I became king of them: Persia, Elam, Babylonia, Assyria, Arabia, Egypt, the countries by the Sea, Lydia, the Greeks, Media, Armenia, Cappadocia, Parthia, Drangiana, Aria, Chorasmia, Bactria, Sogdia, Gandara, Scythia, Sattagydia, Arachosia and Maka; twenty-three lands in all.
(7) King Darius says: These are the countries that are subject to me; by the grace of Ahura Mazda they became subject to me; they brought tribute unto me. Whatsoever commands have been laid on them by me, by night or by day, have been performed by them.
(8) King Darius says: Within these lands, whosoever was a friend, him have I surely protected; whosoever was hostile, him have I utterly destroyed. By the grace of Ahura Mazda these lands have conformed to my decrees; as it was commanded unto them by me, so was it done.
(9) King Darius says: Ahura Mazda has granted unto me this empire. Ahura Mazda brought me help, until I gained this empire; by the grace of Ahura Mazda do I hold this empire.
(10) King Darius says: The following is what was done by me after I became king. A son of Cyrus, named Cambyses, one of our dynasty, was king here before me. That Cambyses had a brother, Smerdis by name, of the same mother and the same father as Cambyses. Afterward, Cambyses slew this Smerdis. When Cambyses slew Smerdis, it was not known unto the people that Smerdis was slain. Thereupon Cambyses went to Egypt. When Cambyses had departed into Egypt, the people became hostile, and the lie multiplied in the land, even in Persia and Media, and in the other provinces.
(11) King Darius says: Afterward, there was a certain man, a Magian, Gaumâta by name, who raised a rebellion in Paishiyâuvâdâ, in a mountain called Arakadriš. On the fourteenth day of the month Viyaxana did he rebel. He lied to the people, saying: “I am Smerdis, the son of Cyrus, the brother of Cambyses.’ Then were all the people in revolt, and from Cambyses they went over unto him, both Persia and Media, and the other provinces. He seized the kingdom; on the ninth day of the month Garmapada he seized the kingdom. Afterward, Cambyses died of natural causes. 
(12) King Darius says: The kingdom of which Gaumâta, the Magian, dispossessed Cambyses, had always belonged to our dynasty. After that Gaumâta, the Magian, had dispossessed Cambyses of Persia and Media, and of the other provinces, he did according to his will. He became king. 
(13) King Darius says: There was no man, either Persian or Mede or of our own dynasty, who took the kingdom from Gaumâta, the Magian. The people feared him exceedingly, for he slew many who had known the real Smerdis. For this reason did he slay them, “that they may not know that I am not Smerdis, the son of Cyrus.’ There was none who dared to act against Gaumâta, the Magian, until I came. Then I prayed to Ahura Mazda; Ahura Mazda brought me help. On the tenth day of the month Bâgayâdiš I, with a few men, slew that Gaumâta, the Magian, and the chief men who were his followers. At the stronghold called Sikayauvatiš, in the district called Nisaia in Media, I slew him; I dispossessed him of the kingdom. By the grace of Ahura Mazda I became king; Ahura Mazda granted me the kingdom.
(14) King Darius says: The kingdom that had been wrested from our line I brought back and I reestablished it on its foundation. The temples that Gaumâta, the Magian, had destroyed, I restored to the people, and the pasture lands, and the herds and the dwelling places, and the houses that Gaumâta, the Magian, had taken away. I settled the people in their place, the people of Persia, and Media, and the other provinces. I restored that which had been taken away, as it was in the days of old. This did I by the grace of Ahura Mazda, I labored until I had established our dynasty in its place, as in the days of old; I labored, by the grace of Ahura Mazda, so that Gaumâta, the Magian, did not dispossess our house.
(15) King Darius says: This was what I did after I became king.

DZP_List应包含除前两个条目(43和44)之外的所有内容。它们都是标题(后面是段落)。

但我的输出不包括43,44和12,其中11以空格结束。如果空间被移除,我得到正确的输出。 2也以空格结束,但工作正常。

此外,我尝试使用各种值更改NEAR条件中的间隔;

0,1 - 包括43&amp; 44(标题)也

1,5 - 12丢失,但是当11中的空格(在输入文件中)被删除时,它可以正常工作。

1,10 - 完美无缺!!

并得到奇怪的结果。

1 个答案:

答案 0 :(得分:0)

数字指定在给定方向上RutaBasic类型的注释的最小和最大数量,其中给定类型需要发生。 RutaBasic是可用的最小注释,可自动创建。通常,每个TokenSeed注释都有一个,如CW,NUM,PERIOD ...