HowManyAreAnalyzed(): use status_user_agent to report progress
[linguistica.git] / DCNnetworksyl.h
blob837b042662eef6f83352902e46cce9f55ce88c7f
1 // Network type for syllable discovery with Dynamic Computational Networks
2 // Copyright © 2009 The University of Chicago
3 #ifndef NETWORKSYL_H
4 #define NETWORKSYL_H
6 // See the corpussyl documentation in DCNcorpussyl.h for an overview.
7 // See also the very similar grammar type in DCNnetwork.h
9 #include "DCNgrammarsyl.h"
10 #include <qstring.h>
11 #include <qlabel.h>
13 /**
14 * A network is a DCN that takes a grammar and puts it
15 * in equilibrium. The network is represented as an array
16 * of nodes, each node being type float. The number of nodes
17 * correspondes to the number of syllables in the word (syl).
18 * A network can output the stress of the word with getStress().
20 class networksyl
23 private:
24 bool converged;
26 float* node;
27 float* sonority;
29 QString word;
30 grammarsyl* theGrammar;
33 public:
34 networksyl();
35 // COPY CONSTRUCTOR?!?
36 virtual ~networksyl();
38 void setGrammar(grammarsyl* theGrammar);
39 void setWord(QString word);
41 void equilibrium();
43 bool isConverged() const { return converged; }
45 int syllable() const { return word.length(); }
47 QString getMaxima() const;
48 QString getSyllabifiedWord() const;
49 grammarsyl* getGrammar() { return theGrammar; }
50 void print(QLabel* label);
51 QString sylPrintout();
55 #endif // NETWORKSYL_H