[927] | 1 | // Copyright 2012 Georg-August-Universität Göttingen, Germany
|
---|
| 2 | //
|
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License");
|
---|
| 4 | // you may not use this file except in compliance with the License.
|
---|
| 5 | // You may obtain a copy of the License at
|
---|
| 6 | //
|
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 8 | //
|
---|
| 9 | // Unless required by applicable law or agreed to in writing, software
|
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS,
|
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
| 12 | // See the License for the specific language governing permissions and
|
---|
| 13 | // limitations under the License.
|
---|
| 14 |
|
---|
[922] | 15 | package de.ugoe.cs.autoquest.commands.usage;
|
---|
[96] | 16 |
|
---|
| 17 | import java.util.List;
|
---|
| 18 | import java.util.Random;
|
---|
| 19 |
|
---|
[922] | 20 | import de.ugoe.cs.autoquest.usageprofiles.DeterministicFiniteAutomaton;
|
---|
| 21 | import de.ugoe.cs.autoquest.usageprofiles.TrieBasedModel;
|
---|
[96] | 22 |
|
---|
[171] | 23 | /**
|
---|
| 24 | * <p>
|
---|
| 25 | * Command to train a Deterministic Finite Automaton (DFA).
|
---|
| 26 | * </p>
|
---|
| 27 | *
|
---|
| 28 | * @author Steffen Herbold
|
---|
[184] | 29 | * @version 2.0
|
---|
[171] | 30 | */
|
---|
[184] | 31 | public class CMDtrainDFA extends AbstractTrainCommand {
|
---|
[96] | 32 |
|
---|
[171] | 33 | /*
|
---|
| 34 | * (non-Javadoc)
|
---|
| 35 | *
|
---|
| 36 | * @see de.ugoe.cs.util.console.Command#help()
|
---|
| 37 | */
|
---|
[96] | 38 | @Override
|
---|
[664] | 39 | public String help() {
|
---|
[726] | 40 | return "trainDFA <modelname> <sequencesName>";
|
---|
[96] | 41 | }
|
---|
| 42 |
|
---|
[184] | 43 | /**
|
---|
| 44 | * <p>
|
---|
| 45 | * No additional parameters.
|
---|
| 46 | * </p>
|
---|
| 47 | *
|
---|
[922] | 48 | * @see de.ugoe.cs.autoquest.commands.usage.AbstractTrainCommand#handleAdditionalParameters(java.util.List)
|
---|
[184] | 49 | */
|
---|
| 50 | @Override
|
---|
| 51 | void handleAdditionalParameters(List<Object> parameters) throws Exception {
|
---|
| 52 | // no additional parameters.
|
---|
| 53 | }
|
---|
| 54 |
|
---|
[171] | 55 | /*
|
---|
| 56 | * (non-Javadoc)
|
---|
| 57 | *
|
---|
[922] | 58 | * @see de.ugoe.cs.autoquest.ui.commands.AbstractTrainCommand#createModel()
|
---|
[171] | 59 | */
|
---|
[96] | 60 | @Override
|
---|
[184] | 61 | TrieBasedModel createModel() {
|
---|
| 62 | return new DeterministicFiniteAutomaton(new Random());
|
---|
[96] | 63 | }
|
---|
| 64 |
|
---|
| 65 | }
|
---|