The auto-completion library (ACL) has a set of English words (alpha words, i.e., words that contain characters only no symbols and/or numbers) that are used to provide possible auto-completions. This library are based on Trie data structure.
- Add new word
- Remove word
- Get auto-completion by providing a given prefix
Add this to build file(build.gradle)
dependencies {
implementation 'io.github.ShqiW:AutoCompletion:0.1.1'
}Add this to pom.xml
<dependency>
<groupId>io.github.ShqiW</groupId>
<artifactId>AutoCompletion</artifactId>
<version>0.1.1</version>
</dependency>// import library
import autocomplete.AutoCompletion;
// Create an instance
AutoComplete autoComplete = new AutoComplete();
// Add words
autoComplete.addWord("hello");
autoComplete.addWord("help");
// Get completions
List<String> completions = autoComplete.getCompletions("hel");
// Returns: ["hello", "help" ...]- JDK: 11+
- Gradle: 7.x
- Clone the repository
git clone https://github.com/CS6510-SEA-SP25/hw1-ShqiW.git
cd hw1-ShqiW- Build the project
./gradlew build# Run all tests
./gradlew test
# Generate coverage report
./gradlew jacocoTestRespotGenerate Javadoc
./gradlew javadocRun quality check
# Checkstyle(Coding Style Check)
./gradlew checkstyleMain checksyleTest
# PMD(Static Code Analysis)
./gradlew pmdMain pmdTest
# SpotBugs(Static Code Analysis)
./gradlew spotbugMain spotbugTestTo generate the JAR package, run:
./gradlew jar- Jacoco test coverage: build/reports/jacoco/test/html/jacoco-resources/index.html
- Checkstyle: build/reports/checkstyle
- PMD: build/reports/pmd
- SpotBugs: build/reports/spotbugs
- Javadoc: build/doc/javadoc/autocomplete
- Github: @ShqiW
- Email: shqiwen@gmail.com
- Project homepage: https://github.com/CS6510-SEA-SP25/hw1-ShqiW
- Maven Central: AutoCompletion on Maven Central