Release-1.1.0
Теперь автоответчик возвращает не строку, а абстрактный объект.
This commit is contained in:
parent
2a057e6b67
commit
aa227a2020
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.sadtech.autoresponder</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<version>1.1.0-RELEASE</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -13,7 +13,7 @@ public abstract class Unit {
|
||||
private List<Unit> nextUnits;
|
||||
|
||||
public Unit() {
|
||||
level=false;
|
||||
level = false;
|
||||
}
|
||||
|
||||
public Unit(Set<String> keyWords, Integer matchThreshold, Integer priority, Boolean level, List<Unit> nextUnits) {
|
||||
|
@ -2,7 +2,6 @@ package org.sadtech.autoresponder.repository;
|
||||
|
||||
import org.sadtech.autoresponder.entity.Person;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public interface PersonRepository {
|
||||
|
@ -1,8 +1,5 @@
|
||||
package org.sadtech.autoresponder.submodule.parser;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
@ -10,12 +7,17 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class Parser {
|
||||
|
||||
@Getter
|
||||
private Set<String> words = new HashSet<>();
|
||||
|
||||
@Setter
|
||||
private String text;
|
||||
|
||||
public Set<String> getWords() {
|
||||
return words;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public void parse() {
|
||||
Pattern p = Pattern.compile("[а-яА-Я0-9]+");
|
||||
Matcher m = p.matcher(text);
|
||||
|
Loading…
Reference in New Issue
Block a user