GithubHelp home page GithubHelp logo

javadatastructures's Introduction

Word List Builder Instructions

This repository contains Java code for building and displaying word lists based on specified input files, data structure types, and maximum word frequencies.

Getting Started

To use this application, follow these steps:

  1. Clone the Repository

    git clone https://github.com/luswepo442/JavaDataStructures.git
  2. Navigate to the Repository

    cd JavaDataStructures
  3. Compile and Run

    • Recommended (GUI): Run WordListGUI.java to use the graphical user interface.

      javac WordListGUI.java
      java WordListGUI
    • Alternative (Command Line): If you prefer using command-line arguments, run WordListMain2.java.

      javac WordListMain2.java
      java WordListMain2 <input_file> <structure_type> <max_frequency>

WordListGUI

  • WordListGUI.java provides a graphical interface for inputting file paths, data structure types ('A', 'L', or 'H'), and maximum word frequencies. It uses Swing components to display the output word lists.

WordListMain2

  • WordListMain2.java is the main class responsible for processing the input file and building the word list based on the specified data structure type.

Usage

Using WordListGUI (Graphical Interface)

  1. Run WordListGUI.java.
  2. Input the file path, data structure type ('A', 'L', or 'H'), and maximum word frequency.
  3. Click "Build Word List" to generate the word list.
  4. View the output directly in the graphical interface.

Using WordListMain2 (Command Line)

  1. Compile WordListMain2.java.

    javac WordListMain2.java
  2. Run with command line arguments:

    java WordListMain2 <input_file> <structure_type> <max_frequency>
    • <input_file>: Path to the input text file.
    • <structure_type>: Specify data structure type ('A' for ArrayList, 'L' for LinkedList, or 'H' for HashMap).
    • <max_frequency>: Maximum word frequency to display.

Example

To build a word list using the GUI:

  • Run WordListGUI.java and input the required information in the provided fields.

To build a word list using command-line arguments:

  • Compile and run WordListMain2.java with specified arguments:
    java WordListMain2 input.txt A 5
    Replace input.txt with your input file path, A with desired data structure type, and 5 with the maximum word frequency.

Sample Input Files

In this repository, you will find 3 sample input files that you can use:

  • bible-complete.txt
  • bible-complete10.txt
  • bible-psalms.txt

Feel free to use them as input files when testing the application.

Important Notes

  • Ensure the input file exists and is accessible.
  • Use valid data structure types ('A', 'L', or 'H') when running WordListMain2.
  • Make sure to provide a positive integer value for the maximum word frequency.

Author

  • Luswepo Daniel Sinyinza
  • Version: 6

For any issues or questions, please contact the author at [email protected]

javadatastructures's People

Contributors

luswepo442 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.