about summary refs log tree commit diff stats
path: root/sentence.h
blob: abf6860224598b1e282aef6fac8c2e416feca0a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef SENTENCE_H_81987F60
#define SENTENCE_H_81987F60

#include <verbly.h>
#include <random>
#include <string>

class sentence {
public:

  sentence(
    const verbly::database& database,
    std::mt19937& rng);

  std::string generate() const;

private:

  verbly::filter parseSelrestrs(verbly::selrestr selrestr) const;

  bool requiresSelrestr(std::string restriction, verbly::selrestr selrestr) const;

  verbly::word generateStandardNoun(std::string role, verbly::selrestr selrestrs) const;

  verbly::token generateStandardNounPhrase(
    const verbly::word& noun,
    std::string role,
    bool plural,
    bool definite) const;

  verbly::token generateClause(const verbly::token& it) const;

  void visit(verbly::token& it) const;

  const verbly::database& database_;
  std::mt19937& rng_;
};

#endif /* end of include guard: SENTENCE_H_81987F60 */