Commit 8d31a2c7dd177489c47111164dfe1c2b1c5b6e65
1 parent
92afcb9c
poprawki w grafie fleksyjnym (dopuszczaliśmy trochę za dziwnych rozwinięć z prefiksami)
git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/trunk@335 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
Showing
1 changed file
with
1 additions
and
26 deletions
morfeusz/InflexionGraph.cpp
@@ -116,29 +116,6 @@ set<InflexionGraph::Path> InflexionGraph::getPossiblePaths(unsigned int node) { | @@ -116,29 +116,6 @@ set<InflexionGraph::Path> InflexionGraph::getPossiblePaths(unsigned int node) { | ||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | -/** | ||
120 | - * To compare results of two segmentation rules like "a> b> c" and "d> e> c" | ||
121 | - * | ||
122 | - * @param v1 | ||
123 | - * @param v2 | ||
124 | - * @return | ||
125 | - */ | ||
126 | -static bool areIsomorphic(const vector<InterpretedChunk>& v1, const vector<InterpretedChunk>& v2) { | ||
127 | - if (v1.size() == v2.size()) { | ||
128 | - unsigned int i; | ||
129 | - for (i = 0; i < v1.size(); i++) { | ||
130 | - if (v1[i].chunkStartPtr != v2[i].chunkStartPtr | ||
131 | - || v1[i].chunkEndPtr != v2[i].chunkEndPtr) { | ||
132 | - return false; | ||
133 | - } | ||
134 | - } | ||
135 | - return true; | ||
136 | - } | ||
137 | - else { | ||
138 | - return false; | ||
139 | - } | ||
140 | -} | ||
141 | - | ||
142 | static bool containsEqualEdge(const vector<InflexionGraph::Edge>& edges, const InflexionGraph::Edge& e) { | 119 | static bool containsEqualEdge(const vector<InflexionGraph::Edge>& edges, const InflexionGraph::Edge& e) { |
143 | for (unsigned int i = 0; i < edges.size(); i++) { | 120 | for (unsigned int i = 0; i < edges.size(); i++) { |
144 | const InflexionGraph::Edge& e1 = edges[i]; | 121 | const InflexionGraph::Edge& e1 = edges[i]; |
@@ -147,9 +124,7 @@ static bool containsEqualEdge(const vector<InflexionGraph::Edge>& edges, const I | @@ -147,9 +124,7 @@ static bool containsEqualEdge(const vector<InflexionGraph::Edge>& edges, const I | ||
147 | && e1.chunk.textEndPtr == e.chunk.textEndPtr | 124 | && e1.chunk.textEndPtr == e.chunk.textEndPtr |
148 | && e1.chunk.segmentType == e.chunk.segmentType | 125 | && e1.chunk.segmentType == e.chunk.segmentType |
149 | && e1.nextNode == e.nextNode | 126 | && e1.nextNode == e.nextNode |
150 | - && e1.chunk.textNoPrefixesStartPtr == e.chunk.textNoPrefixesStartPtr | ||
151 | - && e1.chunk.interpsGroupPtr == e.chunk.interpsGroupPtr | ||
152 | - && areIsomorphic(e1.chunk.prefixChunks, e.chunk.prefixChunks)) { | 127 | + && e1.chunk.interpsGroupPtr == e.chunk.interpsGroupPtr) { |
153 | return true; | 128 | return true; |
154 | } | 129 | } |
155 | } | 130 | } |