Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: [NLTK] How to calculate lexical diversity scores in Jupyter?
Post: RE: [NLTK] How to calculate lexical diversity scor...

(Aug-31-2018, 04:43 PM)Larz60+ Wrote: my brown corpus hasn't been updated in a long time, so I wouldn't worry about the differences. Awesome, thank you very much again, Larz60+!
vanicci General Coding Help 4 11,444 Sep-01-2018, 09:43 AM
    Thread: [NLTK] How to calculate lexical diversity scores in Jupyter?
Post: RE: [NLTK] How to calculate lexical diversity scor...

(Aug-31-2018, 02:40 PM)Larz60+ Wrote: This is modified (from O'Reilly 'Natural Language Processing and Python' page 9) import nltk import nltk.corpus from nltk.book import * from nltk.corpus import ...
vanicci General Coding Help 4 11,444 Aug-31-2018, 03:48 PM
    Thread: [NLTK] How to calculate lexical diversity scores in Jupyter?
Post: [NLTK] How to calculate lexical diversity scores i...

Hi Python/NLTK mentors, Here is the task that I'm trying to implement in Jupyter Notebook: Compare the lexical diversity scores for all 15 text categories in the Brown Corpus. Which genre is more...
vanicci General Coding Help 4 11,444 Aug-31-2018, 01:23 PM
    Thread: [Help] Using "Class" with User Input in an online sign up form
Post: RE: [Solved] Using "Class" with User Input in an o...

(Aug-28-2018, 11:03 AM)vanicci Wrote: [quote='ichabod801' pid='56597' dateline='1535399654'] That's what I was thinking, yes. Thank you very much for following up and for suggesting a more efficient...
vanicci General Coding Help 8 6,686 Aug-29-2018, 10:52 AM
    Thread: [Help] Using "Class" with User Input in an online sign up form
Post: RE: [Solved] Using "Class" with User Input in an o...

(Aug-27-2018, 07:54 PM)ichabod801 Wrote: That's what I was thinking, yes. I appreciate you, ichabod801. Thank you so much!
vanicci General Coding Help 8 6,686 Aug-28-2018, 11:03 AM
    Thread: [Help] Using "Class" with User Input in an online sign up form
Post: RE: [Help] Using "Class" with User Input in an onl...

(Aug-27-2018, 05:19 PM)ichabod801 Wrote: Now you're using global variables, another problematic choice. What I was thinking of was more like: @classmethod def from_input(cls): fname = input('Fi...
vanicci General Coding Help 8 6,686 Aug-27-2018, 07:12 PM
    Thread: [Help] Using "Class" with User Input in an online sign up form
Post: RE: [Help] Using "Class" with User Input in an onl...

(Aug-23-2018, 03:04 PM)ichabod801 Wrote: I would not name the class method input, rather from_input or something similar. Since it's a method, it won't override the input built-in, but it just makes...
vanicci General Coding Help 8 6,686 Aug-26-2018, 08:49 PM
    Thread: [Help] Using "Class" with User Input in an online sign up form
Post: [Help] Using "Class" with User Input in an online ...

Hi Python Mentors, This task is using "Class" with User Input in a sign up form online. The code is running but I would like a code review from anyone. Please be honest and constructive with your fe...
vanicci General Coding Help 8 6,686 Aug-23-2018, 02:03 PM
    Thread: [Help] List of Lists not printing both Cmder/Anaconda?
Post: RE: [Solved] List of Lists not printing both Cmder...

Thank you very much for being so generous, @snippsat! **smile** from pprint import pprint import random M = 'land' o = 'water' h = 11 #number of rows w = 11 #number of columns matrix = [] world =...
vanicci General Coding Help 4 3,576 Aug-15-2018, 03:00 PM
    Thread: [Help] List of Lists not printing both Cmder/Anaconda?
Post: RE: [Help] List of Lists not printing both Cmder/A...

Thank you so much, @snippsat! **smile** I followed your instructions and the code is running now but could you please give me some idea how can I make the output look cleaner? Btw, the only thing...
vanicci General Coding Help 4 3,576 Aug-15-2018, 02:07 PM
    Thread: [Help] List of Lists not printing both Cmder/Anaconda?
Post: [Help] List of Lists not printing both Cmder/Anaco...

Hi Python mentors, I tried running this code: import random M = 'land' o = 'water' h = 11 #number of rows w = 11 #number of columns matrix = [] world = [ [o,o,o,o,o,o,o,o,o,o,o], ...
vanicci General Coding Help 4 3,576 Aug-15-2018, 12:55 PM
    Thread: [Help] A function that generates an n x n sized board?
Post: RE: [Help] A function that generates an n x n size...

Hi @DeaD_EyE & @perfringo, thank you so much for being so generous in sharing your inputs above. Just know, that I really appreciate your time in trying to help me understand the task(s) as it was...
vanicci General Coding Help 5 4,775 Aug-14-2018, 02:26 PM
    Thread: [Help] A function that generates an n x n sized board?
Post: RE: [Help] A function that generates an n x n size...

(Aug-13-2018, 11:47 AM)perfringo Wrote: 2. Write a function that generates an n x n sized board with either land or water chosen randomly What have you tried? Hi @perfringo, I am a beginner so with...
vanicci General Coding Help 5 4,775 Aug-13-2018, 12:01 PM
    Thread: [Help] A function that generates an n x n sized board?
Post: [Help] A function that generates an n x n sized bo...

Hi Python Experts, I'm trying to solve this problem but I am having a hard time understanding what exactly it is that I'm supposed to do? Or what is the desired output? I have spent hours in Google...
vanicci General Coding Help 5 4,775 Aug-13-2018, 11:16 AM
    Thread: [Help] How to print elements from list of lists?
Post: RE: [Help] How to print elements from list of list...

[Image: http://i1064.photobucket.com/albums/u362...pjjnu2.png] ============================================================================== M = "land" o = "water" world = [ [o,o,o,o,o,o,o,o,o,o,...
vanicci General Coding Help 2 2,634 Aug-12-2018, 09:48 AM
    Thread: [Help] How to print elements from list of lists?
Post: [Help] How to print elements from list of lists?

Hi, I'm trying to print the elements inside the list world. I'm using for loop but I kept getting "SyntaxError: invalid character in identifier" The output should be like: water water water water w...
vanicci General Coding Help 2 2,634 Aug-12-2018, 08:28 AM
    Thread: [Help] How to count Letter frequency in a text file?
Post: RE: [Help] How to count Letter frequency in a text...

(Aug-07-2018, 10:48 PM)ichabod801 Wrote: Look at the format method of strings. You can set up a template string that specifies the format for each row: how wide the columns are, what characters go b...
vanicci General Coding Help 6 15,709 Aug-08-2018, 12:23 PM
    Thread: [Help] How to count Letter frequency in a text file?
Post: RE: [Help] How to count Letter frequency in a text...

@ichabod801 and @buran - thank you once again for taking the time sharing your ideas! I managed to restructure my code and it works fine but my next question is how can I make the output like a table...
vanicci General Coding Help 6 15,709 Aug-07-2018, 09:40 PM
    Thread: [Help] How to count Letter frequency in a text file?
Post: [Help] How to count Letter frequency in a text fil...

Hello, I tried looking for "letter frequency" or "frequency distribution" within the forum but I couldn't find any old thread about the subject, unfortunately. Here's the task that I'm trying to do...
vanicci General Coding Help 6 15,709 Aug-07-2018, 12:38 PM
    Thread: [Help] Convert integer to Roman numerals? {Screenshot attached}
Post: RE: [Help] Convert integer to Roman numerals? {Scr...

Thank you @Windspar & @ichabod801 for your amazing feedback! :) While waiting for your responses I managed to figure things out and finally make it work. I had a pair programming session with som...
vanicci General Coding Help 10 9,190 Aug-06-2018, 05:19 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020