Re: counting the same words within a song added by a user using Django

2021-07-12 Thread RaviKiran Kk
We are looking for django developer Plz contact 6309620745 On Mon, Jul 5, 2021, 17:07 DJANGO DEVELOPER wrote: > Hi there. > I am developing a project based on adding songs to the user's library and > to the home page. > other users can also purchase the songs like wise people do shopping on >

Re: counting the same words within a song added by a user using Django

2021-07-11 Thread DJANGO DEVELOPER
Sum thanks for your interest. these are the screenshots of my requirements and of models. On Mon, Jul 12, 2021 at 2:44 AM sum abiut wrote: > I might not fully understand your question. Can you show me what you have > done? show us your models and what you want to achieve. > > > > On Fri, Jul 9,

Re: counting the same words within a song added by a user using Django

2021-07-11 Thread sum abiut
I might not fully understand your question. Can you show me what you have done? show us your models and what you want to achieve. On Fri, Jul 9, 2021 at 4:57 PM DJANGO DEVELOPER wrote: > sum it is giving me error of TextField is not iterable > > On Wed, Jul 7, 2021 at 5:30 AM DJANGO DEVELOPER

Re: counting the same words within a song added by a user using Django

2021-07-09 Thread DJANGO DEVELOPER
https://stackoverflow.com/questions/41689274/split-multiple-selections-into-separate-records-in-a-django-model I also want the same result as it is mentioned here in the stackoverflow question On Fri, Jul 9, 2021 at 10:56 AM DJANGO DEVELOPER wrote: > sum it is giving me error of TextField is

Re: counting the same words within a song added by a user using Django

2021-07-09 Thread DJANGO DEVELOPER
sum it is giving me error of TextField is not iterable On Wed, Jul 7, 2021 at 5:30 AM DJANGO DEVELOPER wrote: > so will it run smoothly? > I mean there is no filter function there so will it filter a specific > field and will give me count for the words? > > On Tue, Jul 6, 2021 at 9:40 PM sum

Re: counting the same words within a song added by a user using Django

2021-07-06 Thread DJANGO DEVELOPER
so will it run smoothly? I mean there is no filter function there so will it filter a specific field and will give me count for the words? On Tue, Jul 6, 2021 at 9:40 PM sum abiut wrote: > You can to something like this > > def count_songs(request): > #get the field that you want to count the

Re: counting the same words within a song added by a user using Django

2021-07-06 Thread sum abiut
You can to something like this def count_songs(request): #get the field that you want to count the words in it field_name = model._meta.get_field('your_field) word_count =Counter(field_name) for key, value in word_count.items(): key = key value=value context={ 'key':key,

Re: counting the same words within a song added by a user using Django

2021-07-06 Thread lalit suthar
cool :D On Tuesday, 6 July 2021 at 10:25:06 UTC+5:30 abubak...@gmail.com wrote: > I found this as well. and I think I want the result this way. > > On Tue, Jul 6, 2021 at 9:21 AM Lalit Suthar wrote: > >> [image: Screen Shot 2021-07-06 at 9.50.12 AM.png] >> Counter works with words also >> >>

Re: counting the same words within a song added by a user using Django

2021-07-05 Thread Lalit Suthar
[image: Screen Shot 2021-07-06 at 9.50.12 AM.png] Counter works with words also nice one Simon Charette learned something new :) On Tue, 6 Jul 2021 at 07:56, DJANGO DEVELOPER wrote: > thanks Simon but I am not using postgresql. I am using sqlite3 database. > so I want a global solution, that

Re: counting the same words within a song added by a user using Django

2021-07-05 Thread DJANGO DEVELOPER
thanks Simon but I am not using postgresql. I am using sqlite3 database. so I want a global solution, that work in all the databases. On Tue, Jul 6, 2021 at 1:54 AM Simon Charette wrote: > If you're using a PostgreSQL you might want to look at using a tsvector > column instead which will ignore

Re: counting the same words within a song added by a user using Django

2021-07-05 Thread Simon Charette
If you're using a PostgreSQL you might want to look at using a tsvector column instead which will ignore stop words (the, or, of, ...) and map lexemes to their number of occurrence and position in the lyrics[0]. Assuming you were to index this column you'd be able to efficiently query it for

Re: counting the same words within a song added by a user using Django

2021-07-05 Thread DJANGO DEVELOPER
Thank you Lalit bhai. it seems to be a solution. but what if I want to get the result for each single word rather than single letter? On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar wrote: > https://www.guru99.com/python-counter-collections-example.html > Counter can be helpful for this situation

Re: counting the same words within a song added by a user using Django

2021-07-05 Thread Lalit Suthar
https://www.guru99.com/python-counter-collections-example.html Counter can be helpful for this situation On Mon, 5 Jul 2021 at 17:07, DJANGO DEVELOPER wrote: > Hi there. > I am developing a project based on adding songs to the user's library and > to the home page. > other users can also