コード例 #1
0
ファイル: Constituent.cs プロジェクト: finalnlp/OpenNlp-1
 /// <summary>
 /// Detects whether this constituent contains a constituent, that is
 /// whether they are nested.  That is, the other constituent's yield is
 /// a sublist of this constituent's yield.
 /// </summary>
 /// <param name="c">The constituent to check against</param>
 /// <returns>True if the other Constituent is contained in this one</returns>
 public bool Contains(Constituent c)
 {
     return(Start() <= c.Start() && End() >= c.End());
 }
コード例 #2
0
ファイル: Constituent.cs プロジェクト: gblosser/OpenNlp
 /// <summary>
 /// Detects whether this constituent contains a constituent, that is
 /// whether they are nested.  That is, the other constituent's yield is
 /// a sublist of this constituent's yield.
 /// </summary>
 /// <param name="c">The constituent to check against</param>
 /// <returns>True if the other Constituent is contained in this one</returns>
 public bool Contains(Constituent c)
 {
     return Start() <= c.Start() && End() >= c.End();
 }
コード例 #3
0
ファイル: Constituent.cs プロジェクト: finalnlp/OpenNlp-1
 /// <summary>
 /// Detects whether this constituent overlaps a constituent without
 /// nesting, that is, whether they "cross".
 /// </summary>
 /// <param name="c">The constituent to check against</param>
 /// <returns>True if the two constituents cross</returns>
 public bool Crosses(Constituent c)
 {
     return((Start() < c.Start() && c.Start() < End() && End() < c.End()) ||
            (c.Start() < Start() && Start() < c.End() && c.End() < End()));
 }
コード例 #4
0
ファイル: Constituent.cs プロジェクト: gblosser/OpenNlp
 /// <summary>
 /// Detects whether this constituent overlaps a constituent without
 /// nesting, that is, whether they "cross".
 /// </summary>
 /// <param name="c">The constituent to check against</param>
 /// <returns>True if the two constituents cross</returns>
 public bool Crosses(Constituent c)
 {
     return (Start() < c.Start() && c.Start() < End() && End() < c.End()) ||
            (c.Start() < Start() && Start() < c.End() && c.End() < End());
 }