Implement the normal extraction we have been using

Assignment Help Computer Engineering
Reference no: EM133369810

PART 1: IN JAVA:

Provide 2 plugins for extracting words: one should implement the "normal" extraction we have been using so far; the second one should extract only non-stop words with z.

Provide 2 plugins for counting words: one should implement the "normal" counting we have been using so far; the second one should count words based on their first letters, so words starting with 'a', words starting with 'b', etc.

(FOUR TOTAL PLUGINS, BUT ONE JAVA FILE PLEASE)

*NOTE: Ensure the output is the TOP 25 words as is done in the python example and ensure it properly removes stop words when I test the code.*

Constraints:

The problem is decomposed using some form of abstraction (procedures, functions, objects, etc.)

All or some of those abstractions are physically encapsulated into their own, usually pre-compiled, packages. Main program and each of the packages are compiled independently. These packages are loaded dynamically by the main program, usually in the beginning (but not necessarily).

Main program uses functions/objects from the dynamically-loaded packages, without knowing which exact implementations will be used. New implementations can be used without having to adapt or recompile the main program.

External specification of which packages to load. This can be done by a configuration file, path conventions, user input or other mechanisms for external specification of code to be linked at run time.

CODE:

import sys, configparser, importlib.machinery

def load_plugins():

config = configparser.ConfigParser()

config.read("config.ini")

words_plugin = config.get("Plugins", "words")

frequencies_plugi n = config.get("Plugins", "frequencies")

global tfwords, tffreqs

tfwords = importlib.machinery.SourcelessFileLoader('tfwords', words_plugin).load_module()

tffreqs = importlib.machinery.SourcelessFileLoader('tffreqs', frequencies_plugin).load_module()

load_plugins()

word_freqs = tffreqs.top25(tfwords.extract_words(sys.argv[1]))

 

for (w, c) in word_freqs:

print(w, '-', c)

Reference no: EM133369810

Questions Cloud

What is value of the joinery investment in boylan company : Prepare the journal entries to record the three entries on The Joinery Company's books. What is the value of The Joinery's investment in Boylan Company
Define legal concepts by incorporating the legal terminology : Use and define legal concepts by incorporating the legal terminology from your textbook where appropriate and relevant.
Psychology perspective does soccer team : In a psychology perspective Does a soccer team have a specific goal or purpose? what is the purpose?
Procedures followed to carry out demolition procedures : Procedures followed to carry out demolition procedures in accordance with safe and effective processes of deconstructing or demolishing a minor building
Implement the normal extraction we have been using : Implement the normal extraction we have been using so far; the second one should extract only non-stop words with z
Sociological and anthropological perspectives : How can you describe a soccer team in the form of storytelling that include psychological, sociological, and anthropological perspectives ?
Show the calculations to add dave vader to the partnership : Show the calculations to add Dave Vader to the partnership and the journal entry to record the transaction. Theresa Trueheart and Ethel Hardachre wish to add
Implementing content-based recommendation engine : What kind of information would businesses need to collect about their products before implementing a content-based recommendation engine?
Discuss the ucc vis-a-vis common law of contracts : Discuss the key differences/similarities in the approach taken by the UCC vis-a-vis the common law of contracts toward the contracts formation process.

Reviews

Write a Review

Computer Engineering Questions & Answers

  List some attributes and operations that defined for a class

List some attributes and operations that might be defined for a class called WindowPane that represents a window pane.

  Would you use a picture video audio message

Research and detail an example of how you would for steganography to hide a message. Would you use a picture, video, audio message?

  Different types of data storage processes

Different types of data storage processes.

  Assume a direct access file consists of sectors

assume a direct access file consists of sectors with 1024 byte capacity. Suppose also that records are 32 bytes long. On which logical sector do the following logical records lie? What is the relative record number in the sector?

  What is the speedup from improving both

Either make multiply instructions run four times faster than before, or make memory access instructions run three times faster than before.

  Which security goal was violated by the it director

Which security goal was violated by the IT Director? What plan would you suggest to Sally to meet the above security controls requirements? Justify your answer

  What is normalization process and the different normal forms

What are the steps for designing a relational database from a domain class model? What is the normalization process and the different normal forms? Why is normalization important?

  Write a verilog module for an odd parity generator circuit

Write a Verilog module for an odd parity generator circuit. The data message is 4 bits. Use Verilog bitwise operators. Do not use always blocks.

  Would professional ethics be implemented in an organization

Professional ethics play a vital role in the computing profession. The conduct of IT Professionals influences many areas of an organization beyond just the information systems group.

  Use contemporary case tools in process and data modeling

Use contemporary CASE tools in process and data modeling

  Explain the leadership paradox

What is the leadership paradox? Give some reasons why a leader can encounter difficulty in newly formed teams or groups using a participative management system

  What is the capacity of the drive

Given the instruction set for MARIE in this chapter, decipher the following MARIE machine language instructions. (Write the assembly language equivalent.)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd