3939public class OverlappingOrTest {
4040
4141
42- @ Ignore
4342 @ Test
4443 public void testOverlappingOr () {
4544 Model m = new Model ();
@@ -60,30 +59,30 @@ public void testOverlappingOr() {
6059 // relative or absolute.
6160 Neuron pattern = m .initNeuron (
6261 m .createNeuron ("BCD" ),
63- 0.4 ,
62+ 2.0 ,
6463 new Input ()
6564 .setNeuron (inputNeurons .get ('b' ))
66- .setWeight (1 .0f )
65+ .setWeight (4 .0f )
6766 .setRecurrent (false )
6867 .setRelativeRid (0 )
69- .setBiasDelta (0.5 )
68+ .setBiasDelta (1.0 )
7069 .setStartRangeMatch (Operator .EQUALS )
71- .setEndRangeMatch (Operator .LESS_THAN_EQUAL )
70+ .setEndRangeMatch (Operator .GREATER_THAN_EQUAL )
7271 .setStartRangeOutput (true ),
7372 new Input ()
7473 .setNeuron (inputNeurons .get ('c' ))
7574 .setWeight (1.0f )
7675 .setRecurrent (false )
7776 .setRelativeRid (1 )
78- .setBiasDelta (0.5 )
77+ .setBiasDelta (0.0 )
7978 .setRangeMatch (RangeRelation .CONTAINS ),
8079 new Input ()
8180 .setNeuron (inputNeurons .get ('d' ))
82- .setWeight (1 .0f )
81+ .setWeight (4 .0f )
8382 .setRecurrent (false )
8483 .setRelativeRid (2 )
85- .setBiasDelta (0.5 )
86- .setStartRangeMatch (Operator .GREATER_THAN_EQUAL )
84+ .setBiasDelta (1.0 )
85+ .setStartRangeMatch (Operator .LESS_THAN_EQUAL )
8786 .setEndRangeMatch (Operator .EQUALS )
8887 .setEndRangeOutput (true )
8988 );
@@ -93,20 +92,11 @@ public void testOverlappingOr() {
9392 System .out .println (doc .neuronActivationsToString (true , false , true ));
9493
9594 int wordPos = 0 ;
96- for (int i = 0 ; i < doc .length (); i ++) {
97- char c = doc .getContent ().charAt (i );
98- if (c == ' ' ) {
99- inputNeurons .get (c ).addInput (doc , i , i + 1 , wordPos ++);
100- }
101- System .out .println (doc .neuronActivationsToString (true , false , true ));
102- }
103-
10495 for (int i = 0 ; i < doc .length (); i ++) {
10596 char c = doc .getContent ().charAt (i );
10697 if (c != ' ' ) {
107- inputNeurons .get (c ).addInput (doc , i , i + 1 );
98+ inputNeurons .get (c ).addInput (doc , i , i + 1 , wordPos ++ );
10899 }
109-
110100 System .out .println (doc .neuronActivationsToString (true , false , true ));
111101 }
112102
0 commit comments