-
大小: 1.98MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-08-16
- 语言: Java
- 标签: KWIC Assignment 解答
资源简介
KWIC4种架构的Java实现,以及根据4个Assignment中要求做出的代码修改,还有对Assignment中问题回答。代码全部可以运行通过并实现规定的功能。前人传的现在免分
代码片段和文件信息
// -*- Java -*-
/*
*
*
* Copyright (c) 2002
* Institute for Information Processing and Computer Supported New Media (IICM)
* Graz University of Technology Austria.
*
*
*
*
*
* Name: KWIC.java
*
* Purpose: KWIC system for Software Architecture constructional example
*
* Created: 11 Sep 2002
*
* $Id$
*
* Description:
* The basic KWIC system is defined as follows. The KWIC system accepts an ordered
* set of lines each line is an ordered set of words and each word is an ordered set
* of characters. Any line may be “circularly shifted“ by repeadetly removing the first
* word and appending it at the end of the line. The KWIC index system outputs a
* listing of all circular shifts of all lines in alphabetical order.
*
*/
package kwic.ms;
/*
* $Log$
*/
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JFileChooser;
import javax.swing.text.html.parser.Parser;
/**
* The KWIC class implements the first architectural solution for the KWIC
* system proposed by Parnas in 1972. This solution is based on functional
* decomposition of the system. Thus the system is decomposed into a number of
* modules each module being a function. All modules share access to data. We
* call the shared data in this case “core storage“. Thus the architectural
* style utilized by this solution is main/subroutine architectural style. We
* have the following modules (functions):
*
* - Master Control (main). This function controls the sequencing among the
* other four functions.
* - Input. This function reads the data lines from the input medium (file)
* and stores them in core for processing by the remaining modules. The
* chracters are stored into a character array (char[]). The blank space is used
* to separate the words. An index is kept to show the starting address of each
* line in the character array. The index is stored as an integer array (int[]).
* - Circular Shift. This function is called after the input function has
* completed its work. It prepares an index which gives the address of the
* first character of each circular shift and the original index of the line in
* the index array made up by input function. It leaves its output in core with
* an array of pairs (original line number starting addres). This array is
* stored as two dimensional integer array (int[][]).
* - Alphabetizing. This function takes as input the arrays produced by input
* and circular shift function. It produces an array in the same format
* (int[][]) as that produced by circular shift function. In this case however
* the circular shifts are listed in another order (alphabetically).
* - Output. This function uses the array
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-03-22 15:52 KWIC作业\
文件 471040 2014-03-14 19:38 KWIC作业\assignment1-ms.doc
文件 462336 2014-03-16 23:00 KWIC作业\assignment2-oo.doc
文件 455680 2014-03-17 11:23 KWIC作业\Assignment3-es.doc
文件 281088 2014-03-18 21:33 KWIC作业\assignment4-pf.doc
文件 691384 2014-03-18 21:31 KWIC作业\KWIC作业.docx
目录 0 2014-03-22 15:51 KWIC作业\源代码\
文件 12709 2003-08-18 11:14 KWIC作业\源代码\es_src.zip
文件 5855 2003-08-18 11:18 KWIC作业\源代码\ms_src.zip
文件 9595 2003-08-18 17:35 KWIC作业\源代码\oo_src.zip
文件 8991 2003-08-18 17:38 KWIC作业\源代码\pf_src.zip
目录 0 2014-03-18 22:37 KWIC作业\源代码修改后\
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\
文件 301 2014-03-14 10:31 KWIC作业\源代码修改后\KWIC\.classpath
文件 380 2014-03-14 10:31 KWIC作业\源代码修改后\KWIC\.project
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\.settings\
文件 598 2014-03-14 10:31 KWIC作业\源代码修改后\KWIC\.settings\org.eclipse.jdt.core.prefs
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\bin\
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\bin\kwic\
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\bin\kwic\ms\
文件 5216 2014-03-16 11:32 KWIC作业\源代码修改后\KWIC\bin\kwic\ms\KWIC.class
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\src\
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\src\kwic\
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC\src\kwic\ms\
文件 19532 2014-03-16 11:32 KWIC作业\源代码修改后\KWIC\src\kwic\ms\KWIC.java
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC_es\
文件 301 2014-03-17 10:16 KWIC作业\源代码修改后\KWIC_es\.classpath
文件 383 2014-03-17 10:16 KWIC作业\源代码修改后\KWIC_es\.project
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC_es\.settings\
文件 598 2014-03-17 10:16 KWIC作业\源代码修改后\KWIC_es\.settings\org.eclipse.jdt.core.prefs
目录 0 2014-03-18 22:35 KWIC作业\源代码修改后\KWIC_es\bin\
............此处省略77个文件信息
评论
共有 条评论