₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,286 members, 8,430,194 topics. Date: Saturday, 20 June 2026 at 04:36 AM

Toggle theme

Python: TUPLES - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingPython: TUPLES (1163 Views)

1 Reply

Python: TUPLES by UncleJJ(op):
this is my code


import pandas as pd
import nltk
import wordsegment
from wordsegment import segment
from nltk import pos_tag, word_tokenize

def readdata():
datafileread = pd.read_csv('data.net.lint.csv')
domain_names = datafileread.DOMAIN[0:5]

for domain_name in domain_names:
seg_words = segment(domain_name)
postagged = nltk.pos_tag(seg_words)
limit_names = postagged
for keys,values in postagged:





readdata()




I am trying to get get the values from the tuples nltk produces but I get this instead
['NN']
['NN']
['PRP']
['RP']
['JJ']
['NN']
['NNS']
['VB']
['NN']
Some values should be on a line and not a new line.

Who can help please.
1 Reply

Practical Introduction To Python Web ProgrammingPython Smtp ScannerMastering Python - Networking And Security Training Video234

I Need A Tutorial On DBMSPhotos: Best Android Music Player in Africa by a NairalanderAndroid Shopping Cart With Paypal Payment Integration