Last change
on this file since 664 was
664,
checked in by sherbold, 12 years ago
|
- modified Command.help(): the help now returns a string with its usage instead of writing directly to the console
- modified listCommands: now writes the help string of each command instead of just the name; this way, the parameters are displayed directly
- moved listCommands from quest-ui-core to java-utils
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.1 KB
|
Line | |
---|
1 | package de.ugoe.cs.quest.ui.commands;
|
---|
2 |
|
---|
3 | import java.util.List;
|
---|
4 | import java.util.Random;
|
---|
5 |
|
---|
6 | import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton;
|
---|
7 | import de.ugoe.cs.quest.usageprofiles.TrieBasedModel;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * <p>
|
---|
11 | * Command to train a Deterministic Finite Automaton (DFA).
|
---|
12 | * </p>
|
---|
13 | *
|
---|
14 | * @author Steffen Herbold
|
---|
15 | * @version 2.0
|
---|
16 | */
|
---|
17 | public class CMDtrainDFA extends AbstractTrainCommand {
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * (non-Javadoc)
|
---|
21 | *
|
---|
22 | * @see de.ugoe.cs.util.console.Command#help()
|
---|
23 | */
|
---|
24 | @Override
|
---|
25 | public String help() {
|
---|
26 | return "trainDFA <modelName> <sequencesName>";
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * <p>
|
---|
31 | * No additional parameters.
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @see de.ugoe.cs.quest.ui.commands.AbstractTrainCommand#handleAdditionalParameters(java.util.List)
|
---|
35 | */
|
---|
36 | @Override
|
---|
37 | void handleAdditionalParameters(List<Object> parameters) throws Exception {
|
---|
38 | // no additional parameters.
|
---|
39 | }
|
---|
40 |
|
---|
41 | /*
|
---|
42 | * (non-Javadoc)
|
---|
43 | *
|
---|
44 | * @see de.ugoe.cs.quest.ui.commands.AbstractTrainCommand#createModel()
|
---|
45 | */
|
---|
46 | @Override
|
---|
47 | TrieBasedModel createModel() {
|
---|
48 | return new DeterministicFiniteAutomaton(new Random());
|
---|
49 | }
|
---|
50 |
|
---|
51 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.