lab 1 apln

21
Ministerul Educație a Republica Moldova Universitatea Tehnică a Moldovei Facultatea Calculatoare Informatică și Microelectronică Catedra Informatică Aplicată Raport Lucrarea de laborator Nr.1 Obiectul: APLN Tema: Indexul Inversat A executat: Chirca Daniela studenta gr MAI-141 A verificat: Lazu Victoria

Upload: diana-odobescu

Post on 17-Dec-2015

222 views

Category:

Documents


3 download

TRANSCRIPT

Ministerul Educaie a Republica Moldova

Universitatea Tehnic a Moldovei

Facultatea Calculatoare Informatic i Microelectronic

Catedra Informatic Aplicat

Raport

Lucrarea de laborator Nr.1

Obiectul: APLN

Tema: Indexul Inversat

A executat:

Chirca Daniela studenta gr MAI-141 A verificat:

Lazu Victoria

lector superior

Chiinu 2014

Tema: Indexul Inversat

Sarcina lucrrii

1. De gsit n Internet cinci texte din acelai domeniu, care ar conine cel mult cinci sau ase propoziii.

2. Prima etapa: Tokenization

3. A doua etap: Normalization

4. A treia etap: Construirea indexului inversat (Inverted Index).

5. De elaborat un program care va prezenta una din etapele enumerate mai sus, sau care va simula un motor de cutare al informaiei.Mersul Lucrrii:Domeniul Sofware TestingTextul 1

Software testingis an investigation conducted to provide stakeholders with information about the quality of the product or service under test.[1]Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not limited to the process of executing a program or application with the intent of findingsoftware bugs(errors or other defects).

Software testing can be stated as the process of validating and verifying that a computer program/application/product:

Software testing, depending on the testing method employed, can be implemented at any time in the software development process. Traditionally most of the test effort occurs after the requirements have been defined and the coding process has been completed, but in theAgileapproaches most of the test effort is on-going. As such, the methodology of the test is governed by the chosen software development methodology.Textul 2Testing can never completely identify all the defects within software.[2]Instead, it furnishes acriticismorcomparisonthat compares the state and behavior of the product againstoraclesprinciples or mechanisms by which someone might recognize a problem. These oracles may include (but are not limited to) specifications,contracts,[3]comparable products, past versions of the same product, inferences about intended or expected purpose, user or customer expectations, relevant standards, applicable laws, or other criteria.

A primary purpose of testing is to detect software failures so that defects may be discovered and corrected. Testing cannot establish that a product functions properly under all conditions but can only establish that it does not function properly under specific conditions.[4]The scope of software testing often includes examination of code as well as execution of that code in various environments and conditions as well as examining the aspects of code: does it do what it is supposed to do and do what it needs to do

Texul 3In the current culture of software development, a testing organization may be separate from the development team. There are various roles for testing team members. Information derived from software testing may be used to correct the process by which software is developed.[5]Every software product has a target audience. For example, the audience for video game software is completely different from banking software. Therefore, when an organization develops or otherwise invests in a software product, it can assess whether the software product will be acceptable to its end users, its target audience, its purchasers and other stakeholders.Software testingis the process of attempting to make this assessment.

Defects and failures Not all software defects are caused by coding errors. One common source of expensive defects is requirement gaps, e.g., unrecognized requirements which result in errors of omission by the program designer.Textul 4Requirement gaps can often benon-functional requirementssuch astestability,scalability,maintainability,usability,performance, andsecurity.

Software faults occur through the following processes. A programmer makes anerror(mistake), which results in adefect(fault, bug) in the softwaresource code. If this defect is executed, in certain situations the system will produce wrong results, causing afailure.[7]Not all defects will necessarily result in failures. For example, defects indead codewill never result in failures. A defect can turn into a failure when the environment is changed. Examples of these changes in environment include the software being run on a newcomputer hardwareplatform, alterations insource data, or interacting with different software.[7]A single defect may result in a wide range of failure symptoms

Textul 5Input combinations and preconditions

A very fundamental problem with software testing is that testing underallcombinations of inputs and preconditions (initial state) is not feasible, even with a simple product.This means that the number ofdefectsin a software product can be very large and defects that occur infrequently are difficult to find in testing. More significantly,non-functionaldimensions of quality (how it is supposed tobeversus what it is supposed todo)usability,scalability,performance,compatibility,reliabilitycan be highly subjective; something that constitutes sufficient value to one person may be intolerable to another.

Software developers can't test everything, but they can use combinatorial test design to identify the minimum number of tests needed to get the coverage they want. Combinatorial test design enables users to get greater test coverage with fewer tests. Whether they are looking for speed or test depth, they can use combinatorial test design methods to build structured variation into their test cases. 1.TOKENIZATIONTextul 1

software

testing

is

a

investigation

conducted

to

provide

stakeholders

with

information

about

the

quality

of

product

or

service

under

test

can

also

objective

independent

view

allow

business

appreciate

and

understand

risks

implementation

techniques

include

but

are

not

limited

process

executing

a

program

application

intent

finding

bugs

errors

other

defects

be

stated

as

validating

verifying

that

computer

depending

on

method

employed

implemented

at

any

time

in

development

traditionally

most

effort

occurs

after

requirements

have

been

defined

coding

has

completed

agile

approaches

ongoing

such

methodology

governed

by

chosen

Textul 2testing can never completely identify all the defects within software instead it furnishes a criticism or comparison that compares state and behavior of product againstoracles

principles mechanisms by which someone might recognize problem these oracles may include but are not limited to specifications contracts comparable products past versions same inferences about intended expected purpose user customer expectations relevant standards applicable laws other criteria

primary is detect failures so be discovered corrected cannot establish functions properly under conditions only does functionspecific scope often includes examination code as well execution in various

environments examining aspects do what supposed needs

Textul3

in

the

current

culture

of

software

development

a

testing

organization

may

be

separate

from

team

there

are

various

roles

for

members

information

derived

used

to

correct

process

by

which

is

developed

every

product

has

target

audience

example

video

game

completely

different

banking

therefore

when

an

develops

or

otherwise

invests

it

can

assess

whether

will

acceptable

its

end

users

purchasers

and

other

stakeholders

attempting

make

this

assessment

defects

failuresnot

all

caused

coding

errors

one

common

source

expensive

requirement

gaps

eg

unrecognized

requirements

result

omission

program

designer

Textul 4requirement

gaps

can

often

be

non

functional

requirements

such

as

testability

scalability

maintainability

usability

performance

andsecurity

software

faults

occur

through

the

following

processes

a

programmer

makes

an

error

mistake

which

results

in

defect

fault

bug

source

code

if

this

is

executed

certain

situations

system

will

produce

wrong

causing

failure not all defects necessarily result failures for example dead never turn into when environment changed examples

of these

changes

include being run on

newcomputer hardware platform

alterations data or interacting with different single may wide

range

symptoms

Textul 5

input combinations and preconditions a very fundamental problem with software testing is that under all of

inputs

initial

state

not feasible

even simple product this means the number defects in can be

large occur infrequently are difficult to find more significantly nonfunctional

dimensions quality how it supposed versus what do usability

scalability performance compatibility reliability highly subjective something constitutes sufficient value one person may intolerable another developers test everything but they

use

combinatorial design identifyminimum tests needed get coverage want enables users greater fewer whether looking for speed or depth methods build structured variation into their cases

Normalizarea:Textul Nr1

software

testing

to be investigation

conduct

provide

stakehold

information

quality

product

service

test

can objective

independent

view business

appreciate understand

riskimplementation

technique

include limitprocess

execute program

application

intent

findbug

error

defect

to bestate validate

verify computer

depend method

employ

implement

time

development

traditionally effort

occur

requirementto have

definecode complete

agile

approach methodology

governchose

Textul Nr 2completeidentify

defect

software

instead

furnish

criticism

comparison

comparestate

behavior

product storacles

principle

mechanism

someone

recognize

problem

oracleinclude

limitespecification

contractcomparable

productpast

version

inference

intendexpect

purpose

user

customer

expectation

relevant

standardapplicable

law

criteria

primary

detect

failure

discover

correct

establish

function

properly

condition

to dofunction

specific

scope

often

include

examination

code

well

execution

various

environment

examining

aspectsuppose

need Textul Nr 3

current

culture

software

development

testing

organization

to be

separate

team

to be

various

role member

information

deriveusecorrect

process to bedevelope product

havetarget

audience

example

video

game

complete

different

banktherefore

when develop otherwise

investcan

acceptend

user

purchaserother

stakeholders

attempting

make

this

assessment

defects

failuresnot

all

caused

coding

errors

one

common

source

expensive

requirement

gaps

eg

unrecognized

Textul Nr 4requirement

gapcan

to be

functional

requirement testability

scalability

maintainability

usability

performance

security

software

faultoccur

through following

process

programmer

make error

mistake

resultdefect

fault

bug

source

code

execute

certain

situation

system

will

produce

wrong

causefailure

defect

necessary

result

failureexample

dead

turn

environment

change

examplechange

include

being

run computer

hardware

platform

alteration

data

interact

different

single wide

range

symptomTextul Nr5

input

combination

preconditionfundament

problem

software

testing

to be

all

input

initial

state feasible simple

product

meannumber

defectcan

to be

large

occur

infrequent

to bedifficult

to find

significant

nonfunctional

dimension

quality

suppose

versus

to do

usability

scalability

performance

compatibility

reliability

highly

subjective

constitute

sufficient

value

person

developer

test

they

to use

combinatorial

design

identify

minimum

test

need

to get

coverage

to want

enable

user

greater

to look

speed

depth

method

build

structure

variation

their

case Inversion INDEX

Term Frecventa Doc Id

software 5[1][2][3][4] [5]

testing 3[1][3][5]

to be 9[1]-2,[3]-3,[4]-1,[5]-3

investigation 1[1]

conduct 1[1]

provide 1[1]

stakehold 2[1][3]

information 2[1][3]

quality 2[1][5]

product 5[1]-1,[2]-2,[3]-1,[5]-1

service 1[1]

test 3[1]-1,[5]-2

can 5[1][2][3][4] [5]

objective 1[1]

independent1[1]

view 1[1]

business 1[1]

appreciate 1[1]

understand 1[1]

risk1[1]

implementation 1[1]

technique 1[1]

include 4[1]-1,[2]-1,[4]-2

limit2[1][2]

process 3[1]-1,[3]-1,[4]-1

execute 2[1][4]

program 1[1]

application 1[1]

intent 1[1]

find2[1][5]

bug 2[1][5]

error 3[1],[3],[4]

defect 6[1]-1,[2]-1,[3]-1,[4]-2,[5]-1

to be8[1]-1,[3]-3,[4]-1,[5]-3

state 3[1],[2],[5]

validate 1[1]

verify 1[1]

computer 2[1],[4]

depend 1[1]

method 2[1]

employ 1[1]

implement 1[1]

time 1[1]

development 2[1],[3]

traditionally 1[1]

effort 1[1]

occur 3[1],[4],[5]

requirement4[1]-1,[3]-1,[4]-2

to have 1[1]

define1[1]

code 3[1],[2],[4]

complete 3[1],[2],[3]

agile 1[1]

approach 1[1]

methodology 1[1]

govern1[1]

chose 1[1]

identify 2[2],[5]

instead 1[2]

furnish 1[2]

criticism 1[2]

comparison 1[2]

compare1[2]

behavior 1[2]

storacles 1[2]

principle 1[2]

mechanism 1[2]

someone 1[2]

recognize 2[2],[3]

problem 2[2],[5]

oracle1[2]

specification 1[2]

contract1[2]

comparable 1[2]

past 1[2]

version 1[2]

inference 1[2]

intend1[2]

expect 2[2]

purpose 1[2]

user 3[1],[3],[5]

customer 1[2]

expectation 1[2]

relevant 1[2]

standard1[2]

applicable 1[2]

law 1[2]

criteria 1[2]

primary 1[2]

detect 1[2]

failure 4[2]-1,[3]-1,[4]-2

discover 1[2]

correct 2[2],[3]

establish 1[2]

function 4[2]-2,[4]-1,[5]-1

properly 1[2]

condition 2[2],[5]

to do2[2],[5]

specific 1[2]

scope 1[2]

examination 1[2]

well 1[2]

execution 1[2]

various 2[2],[3]

environment 2[2],[4]

examining 1[2]

aspect1[2]

suppose 2[2],[5]

need 2[2],[5]

current 1[3]

culture 1[3]

organization 1[3]

separate 1[3]

team 1[3]

role 1[3]

member 1[3]

derive1[3]

use2[3],[5]

develope 3[3],[5]

have1[3]

target 1[3]

audience 1[3]

example 3[3]-1,[4]-2

video 1[3]

game 1[3]

different 2[3],[4]

bank1[3]

develop 1[3]

invest1[3]

can 1[3]

accept1[3]

end 1[3]

purchaser1[3]

attempt 1[3]

make 2[3],[4]

assessment 1[3]

all 2[3],[5]

caused1[3]

coding 1[3]

common 1[3]

source 2[3][4]

expensive 1[3]

gaps 1[3]

can 2[4][5]

testability 1[4]

scalability 2[4][5]

maintainability 1[4]

usability 2[4][5]

performance 2[4][5]

security 1[4]

fault2[4]

following 1[4]

programmer 1[4]

make 1[4]

mistake 1[4]

result2[4]

fault 1[4]

source 1[4]

certain 1[4]

situation 1[4]

system 1[4]

will 1[4]

produce 1[4]

wrong 1[4]

cause1[4]

necessary 1[4]

result 1[4]

dead 1[4]

turn 1[4]

change 1[4]

change 1[4]

being 1[4]

run 1[4]

computer 1[4]

hardware 1[4]

platform 1[4]

alteration 1[4]

data 1[4]

interact 1[4]

single 1[4]

wide 1[4]

range 1[4]

symptom1[4]

input 1[5]

combination 1[5]

fundament 1[5]

all 1[5]

input 1[5]

initial 1[5]

feasible 1[5]

simple 1[5]

mean1[5]

number 1[5]

large 1[5]

infrequent 1[5]

difficult 1[5]

significant 1[5]

dimension 1[5]

versus 1[5]

compatibility 1[5]

reliability 1[5]

highly 1[5]

subjective 1[5]

constitute 1[5]

sufficient 1[5]

value 1[5]

person 1[5]

they 1[5]

combinatorial 1[5]

design 1[5]

minimum 1[5]

to get 1[5]

coverage 1[5]

to want 1[5]

enable 1[5]

greater 1[5]

Concluzii

n urma elaborrii acestei lucrri m-am familiarizat mai bine cu noiunea de tokenizare i a indexului inversat, am gsit din sursele internet cinci texte pe aceai tem i folosind softul masterca am separat cuvintele, apoi manual le-am transferat n forma iniial, conform regulilor. Dup ce am efectuat aceast procedur la fiecare din texte, am elaborat un program care face tokenizarea automata a unui volum de text. Lucrarea dat mi s-a prut interesant i folositoare.Programul de tokenizare automata elaborat in C:

#include int main ()

{

char s[256];

strcpy(s, "Software testing is an investigation conducted to provide stakeholders with information about the quality of the product");

char* token = strtok(s, " ");

while (token) {

printf("token: %s\n", token);

token = strtok(NULL, " ");

}

return 0;p}REZULTATELE PROGRAMULUI:

Output:1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

token: Software

token: testing

token: is

token: an

token: investigation

token: conducted

token: to

token: provide

token: stakeholders

token: with

token: information

token: about

token: the

token: quality

token: of

token: the

token: product

Concluzii

n urma elaborrii acestei lucrri m-am familiarizat mai bine cu noiunea de tokenizare i a indexului inversat, am gsit din sursele internet cinci texte pe aceai tem i folosind softul masterca am separat cuvintele, apoi manual le-am transferat n forma iniial, conform regulilor. Dup ce am efectuat aceast procedur la fiecare din texte, am elaborat un program care face tokenizarea automata a unui volum de text. Lucrarea dat mi s-a prut interesant i folositoare.