Did I find the right examples for you? yes no

# analyse_nominal_group.find_sn

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
```Returns the first nominal group found in the sentence.

:param list sentence: the sentence as a list of words
:return: the nominal group
```

```        def find_sn(sentence):
"""
Returns the first nominal group found in the sentence.

:param list sentence: the sentence as a list of words
:return: the nominal group
"""

nb_position = 1

#If sentence is empty
if not sentence:
return []

for x in sentence:
#If there is a pronoun
if x in ResourcePool().pronouns:
return [sentence[sentence.index(x)]]

#If there is a nominal group with determinant
if x in ResourcePool().determinants:
nb_position += adjective_pos(sentence, sentence.index(x) + 1)
return sentence[sentence.index(x): sentence.index(x) + nb_position]

#If we have 'something'
for k in ResourcePool().composed_nouns:
if x.startswith(k):
if x in ResourcePool().noun_not_composed:
return []
return [sentence[sentence.index(x)]]

#If there is a number, it will be the same with determinant
if other_functions.number(x) == 1:
nb_position += adjective_pos(sentence, sentence.index(x) + 1)
return sentence[sentence.index(x): sentence.index(x) + nb_position]

#If there is a proper name
counter = sentence.index(x)
while counter < len(sentence) and other_functions.find_cap_lettre(sentence[counter]) == 1:
counter += 1
#Not equal => there is a proper name
if counter != sentence.index(x):
return sentence[sentence.index(x): counter]

#Default case
return []
```

```    conjunction = 'AND'

object = analyse_nominal_group.find_sn(phrase)

if phrase and \
```
```        #If the last nominal group is followed by another one in plural form
phrase = analyse_nominal_group.find_plural(phrase)
object = analyse_nominal_group.find_sn(phrase)

return phrase
```