₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,212 members, 8,510,677 topics. Date: Friday, 30 October 2026 at 07:57 PM

Toggle theme

Python: TUPLES - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Python: TUPLES (1185 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 Programming • Python Smtp Scanner • Mastering Python - Networking And Security Training Video • 2 • 3 • 4

How To Learn Programming In 30minutes • Study Programming Abroad In Ukraine At Low Price • Are You Good With Laravel?