summary refs log tree commit diff stats
path: root/sentence.h
blob: 5e09a4708d9b8d4cf7233fe4dd0b57df9a21c3f8 (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:

  bool chooseSelrestr(std::set<std::string> selrestrs, std::set<std::string> choices) const;

  verbly::word generateStandardNoun(std::string role, std::set<std::string> 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_;

  verbly::filter badWords_;
};

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