ZwenAusZwota / pyector

Automatically exported from code.google.com/p/pyector
0 stars 0 forks source link

Make types specialized Nodes #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For the moment, as I port ECTOR from C to Python, NodeType is a class
alone, and types are instances of this class, that is an attribute of a Node.

Why not, instead of node which type is a NodeType("token"), write a derived
class: TokenNode with a decay rate?

I still have to check that I could change the decay rate of all TokenNode s
at once, by making the decay rate a class attribute.
This is important to fine tune the ConceptNetwork.

Original issue reported on code.google.com by francois.parmentier@gmail.com on 22 Oct 2008 at 7:30

GoogleCodeExporter commented 8 years ago

Original comment by francois.parmentier@gmail.com on 22 Oct 2008 at 7:31

GoogleCodeExporter commented 8 years ago
That is not necessarily a good idea: since I wanted to derive Node to 
EctorNode, in
which to add:
beginning : occurrence of a token in the beginning of a sentence
middle    : occurrence of a token in the middle of a sentence
end       : occurrence of a token in the end of a sentence.

As I write it, I understand that yes! It is a good idea. This will not be 
derived to
EctorNode, but TokenNode, SentenceNode, etc.

But this derived classes should be in Ector.py, not in ConceptNetwork.py

So, integrating NodeType into Node is a good idea (this will simplify the code).

Original comment by francois.parmentier@gmail.com on 25 Oct 2008 at 9:18

GoogleCodeExporter commented 8 years ago
In the same manner, on can add SentenceNode, with statistics on the occurrence 
in the
beginning of a dialogue, at the end, or in the middle (which is not as 
important as
the beginning and end).

Original comment by francois.parmentier@gmail.com on 26 Oct 2008 at 5:24

GoogleCodeExporter commented 8 years ago
To specialize the Node class, one needs to redefine getTypeName and getDecay.
Unfortunately, I did not find any other way of doing.
r43 fixed this.

Original comment by francois.parmentier@gmail.com on 27 Oct 2008 at 2:43