it's funny that puppy is catergorized as JJ adjective

**but** it did not work. So wrote this funtion **s2t_tag_org()**;give back words with tags


    def s2t_tag_org(text):
    return text.tags


Still did not work. So I changed **s2t_tag_org** into **value.tags**

def jjcounter(value):
    count = 0 
    for (word, tag) in value.tags:
        if tag == 'JJ':
            count = count + 1
    return(count)

def nncounter(value):
    count = 0 
    for (word, tag) in value.tags:
        if tag == 'NN':
            count = count + 1
    return(count)

Then it worked! :)

If every novel had about the same percentage of adjectives, it almost certainly wouldn't be interesting to track and compare them. But future work along these lines, embracing a lager corpus of novels, has the potential to show interesting patters, wherther or not there is anything to be gained by comparing these two particular novels in this way.

"potential to show interesing pattern" is interesting. Because pattern means multiple, and it's mystery.

Inflected word list

An inflected form of a word has a changed spelling or ending 
that shows the way it is used in sentences:

"Finds" and "found" are inflected forms of "find".

for in : # Iteration through the word list

if ______: #conditional testing to see if we have a reduplication

    print(____) #Only if we do, print the word

the expression I used is w[:len(w)//2] * 2 == w I called the variable that was holding the individa=ual words w. you may have called it something else, such as word. Then I took a slice of w from the beginning up to the halfway point, which as a floating-point number is len(w)/w.

However, we need an integer to be used in slicing this string, so we use interger division len(w)//w. (u need two //) Then I multipled this string by 2. This will do string multiplication like cowboy => cowcow but tutu => tutu What remains is to check to see if this is the same as the word itself.

Q. I understand why he wrote this line but what I do not understand the way is written. w[:len(w)] why ':'?

oh, when I rerun the source = open('English_word_list.txt') words = source.read().split() source.close()

now it prints 'awaw'

one thing that may seem odd is that in the program structure, I did not check to see whether the word has an odd or even number of characters. A word with an odd-length word cannot be a reduplication as we have defined it. If the conditional is constructed properly, it's not necessary. Finding a simpler solution is best. => this reminds me of Kimberly's point about rejection. That maybe rejection is about honesty and simplification, and clarification.

synset means different group, for example, the word bank can mean 은행, 강둑 so it is under different sub-group; synset

"When you select a particular sense, u r also choosing a synset, a set of particular words or phrases(called lemma names) that for most all practical purposes mean the same thing and relate to the specific sense."

So if you want to know if two synsets are the same, you should check to see if the two Synset objects are equal, not if they have the same lemma names as returned by their lemma_name() methods.

Because if you use lemma_name()methods, there are a lot of overlapping, same name 'bank'

As you can see here, the definition, the content of bank1 and bank3 are not the same, but it is under the same lemma_names which may lead to confusion..?

Let's give it a lool on gernerality and specificity. "Sedan" is one particular more sepcific term for a car, while "motor vehicle" is a more general term.

Synsets are ordered by how common each sense is, so we can expect that the automotive sense will be early in the list. It is indeed, first!

Q What's the difference between definitions and definition?? In line 127 I wrote car_word.definitions and in line 132 only car1.definition (not definitions) works.

Hypernym means "a word whose meaning includes a group of other words:" => generality 더 큰 그룹을 의미 ex) The first hypernyms for dog that come to mind would be animal or pet.

and

Hyponym means "a word whose meaning is included in the meaning of another word:" => specificality 더 작은 그룹, 예시를 의미 ex) "Horse" is a hyponym of "animal".

One of the interesting things that WordNet can assist with is changing a text to be more general or more specific.

(I think by using .hpernyms and .hyponyms)

바로 위의 코드는 가장 일반적인 river의 뜻을 가져오고 그것을 river라는 변수에 할당하기 위한 작업을 의미하는 듯. 하지만 어떤 때에는 첫번째에 오는 것이 가장 일반적인 의미가 아닐수도 있으니 확인하는 작업이 필요. 그래서 다음의 코드들은 그것을 확인하는 작업임.

Q how can we print with linebreaks again..?

With some programming background, you can learn to cut up a text in new, surprising and compelling ways.

Why this not work? come back again and try it again.

The issue here is that we want only one subsitution to happen each time we go through the loop, so that one _ get replaced each time. However, our substitution metiod is too eager. There is an easy fix for this. The sub() function accepts an optional fourth argument, count, that limits how many substitutions will be made. For instance if sub(text, 'sky', 'sea', 3) were used, then sky would be replaced by sea at most three times in the string text.

Q why line 189 is not working? and what can I do about it?

terminal we are done with production

nonterminal to continue with the generation of your string we will look through the other rules is the one that applies. that rule says that Wrong produces one of these three strings; 'rong', 'way wrong', 'wrong'

Sentence: nonterminal / we:terminal / 'we' is followed by three nonterminals: Aux, Act, Last / But Last is different: this rule could result in the terminal "it" - but it could also continue generation by moving along to the Sentence rule. That does something that you may find interesting: It produces another embedded sentence.

recursive grammar

print(sentence())

I don;t understand this part def last(): phrase = choice(["it", sentence()]) if not phrase: phrase = sentence() return phrase

Q why not if phrase: phrase = sentence()?