auto-correct a speech-to-text output and relate to of the words based on syllables

2018-02-01 Thread naveen
Hi,

I have to make an application in which, 

The user asks a question, Google's API is used to convert the speech to text. 
But the problem is due to different accent the translator misunderstands the 
words. 
I want my application to guess the word to the nearest word spoken by the user. 
When the user speaks a word, the syllables in the word should be matched with 
the syllables of other words in my dictionary. 
Till now what I have done,
I used CMU pronouncing dictionary. It contains ~122300 words along with its 
syllables.
Along with this, I have created my own dictionary which consists of words that 
I need only.
I have implemented a python logic that makes reasonable guesses for the words 
user speaks and matches with my dictionary.
But sometimes for more than a word it makes the same guess.
example:
The user speaks "Light". The system translates it as "Bright"
The user speaks "White" The system translates it as "Bright"
I don't want this to happen. This system should make a reasonable conversion.

Any help would be appreciated.

I am using python for logic.

Regards,
Naveen BM
-- 
https://mail.python.org/mailman/listinfo/python-list


embed python dynamically

2009-11-25 Thread naveen
How do you embed the python dll file distributed with the automatic
installable python distribution on windows?
Is it possible to dynamically load the python dll from running c
program and start up a python interpreter ?
Do you have to compile python from source to be able to embed python?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: embed installed python dynamically

2009-11-25 Thread naveen
ok, it was almost intuitive.
just made a simple visual c express dll project
included python26\include and python26\libs in the project settings
the debug version has issues, but the release compiles without a
problem.
here is the source:
http://github.com/tinku99/embedpython
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: embed installed python dynamically

2009-11-25 Thread naveen
ok, its even easier than that.
With autohotkey:

pythondll := DllCall("LoadLibrary", "str", "c:\windows
\system32\python26.dll")
init := DllCall("c:\windows\system32\python26.dll\Py_Initialize"
, "Cdecl")
msgbox python initalized
call := DllCall("c:\windows\system32\python26.dll\PyRun_SimpleString"
, "str", "import sys", "Cdecl")
msgbox will exit using python code
call := DllCall("c:\windows\system32\python26.dll\PyRun_SimpleString"
, "str", "sys.exit(0)", "Cdecl")
init := DllCall("c:\windows\system32\python26.dll\Py_Finalize"
, "Cdecl")
msgbox % never called
-- 
http://mail.python.org/mailman/listinfo/python-list


define class over 2 files

2009-08-17 Thread naveen
Is it possible to split up a class definition over multiple files?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: define class over 2 files

2009-08-18 Thread naveen
> > Is it possible to split up a class definition over multiple files?
>
> Not exactly, but you can do variations of this:
... [subclass a class]
> Steven

Thanks Steven.
I guess I will just preprocess the script:

cat partA.py > class.py
cat partB >> class.py
python class.py


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: define class over 2 files

2009-08-18 Thread naveen
> indicator of bad practice. What is the problem you're trying to solve?
> Ben Finney

No major problem.
I was just trying to make some experimental changes to autokey. My
repo: http://github.com/tinku99/autokey.git/

Didn't want to subclass or reorganize a class just yet.
-- 
http://mail.python.org/mailman/listinfo/python-list


type and object

2017-10-05 Thread Naveen Yadav
Hi folks,


>> isinstance(type, object) is True   # 1
and
>> isinstance(object, type) is True   # 2


its means type is object is type, But i am not sure how is this.

For what i can understand is 
for #1: since every thing is object in python, type is also an object.
and 
for #2: object is a base type. therefore object is type
>> object.__doc__
>> 'The most base type'


Am I understanding this correct ? Please shed light on this.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: type and object

2017-10-05 Thread Naveen Yadav
On Thursday, 5 October 2017 21:47:34 UTC+5:30, Naveen Yadav  wrote:
> Hi folks,
> 
> 
> >> isinstance(type, object) is True   # 1
> and
> >> isinstance(object, type) is True   # 2
> 
> 
> its means type is object is type, But i am not sure how is this.
> 
> For what i can understand is 
> for #1: since every thing is object in python, type is also an object.
> and 
> for #2: object is a base type. therefore object is type
> >> object.__doc__
> >> 'The most base type'
> 
> 
> Am I understanding this correct ? Please shed light on this.

thanks guys for clearing this out.
-- 
https://mail.python.org/mailman/listinfo/python-list


Required Python/Backend Engineer, Data in Redwood City, CA -- full time

2016-01-08 Thread naveen . v
Hi ,

 

One of our client seeking Python/Backend Engineer, Data in Redwood City, CA If 
you are interested please send me your updated resume at [email protected]  
along with your expected salary.

Title: Python/Backend Engineer, Data
Location: Redwood City, CA
Full time position

 

Required:

·comfortable in Linux (Ubuntu) environment

·Java, Scala, Python and/or C++ proficiency

·experience using various RDBM and NoSQL dbs and when to use each

·BS or MS in Computer Science, related degree or equivalent experience

·great attitude, team player and ability to thrive and learn in a fast-paced 
environment
-- 
https://mail.python.org/mailman/listinfo/python-list


FW: Options enabled under optimization

2006-01-12 Thread Naveen H.S.

Hi 
I had mailed yesterday about the following topic to know the flags or
options that are enabled when -O,-O2,-O3,-Os options are enabled.
As mentioned below I was given this mail id to contact. So I am writing
this mail with a lot of hopes.

Ex Some flags that are enabled when -O is enabled is
-fomit-frame-pointer
-fdefer-pop etc.I would like to know all the flags that will be enabled.
I am writing this mail with a lot of hopes; I hope that I would not be
disappointed this time.

Thanks & regards
Naveen
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 13,
2006 2:53 AM
To: Naveen H.S.
Cc: [EMAIL PROTECTED]
Subject: Re: Options enabled under optimization


Naveen> I want to know the flags or options that are enable under
    Naveen> -O,-O2,-O3,-Os optimizations.

Naveen,

Sounds like a compiler question, not a Python question.  Try the
documentation or the source code for the compiler you're using.

On the outside chance your question is actually Python-related, the
proper
venue is the Usenet newsgroup comp.lang.python or the equivalent mailing
list [EMAIL PROTECTED]

-- 
Skip Montanaro
http://www.musi-cal.com/
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


how to call file from Jython?

2007-08-09 Thread Naveen kumar
Hi I want to excute a .cmd file on windows through jython.. How can i do that?
   
  I am using following code
   
  import os
   
  os.system("C:/testfile/anotherfolder/Startserver.cmd")
   
  can any body let me know how can excute Startserver.cmd from jython??
   
  thanks,
  Naveen

   
-
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.-- 
http://mail.python.org/mailman/listinfo/python-list

pyserial doesn't recognize virtual serial port

2007-10-11 Thread naveen . sabapathy
Hi,
  I am trying to use virtual serial ports to develop/test my serial
communication program. Running in to trouble...

  I am using com0com to create the virtual ports. The virtual ports
seem to be working fine when I test it with Hyperterminal .

I am using the example program that comes with pyserial, as below.
---
import serial
ser = serial.Serial('CNCA0') #open virtual serial port
print ser.portstr#check which port was realy used
ser.write("Hello")  #write a string
ser.close()  #close port
-

The following is the error message:

--
Traceback (most recent call last):
  File "C:\Python25\Naveen Files\TestSerial", line 2, in 
ser = serial.Serial('CNCA0') #open first serial port
  File "c:\Python25\Lib\site-packages\serial\serialutil.py", line 156,
in __init__
self.open()
  File "c:\Python25\Lib\site-packages\serial\serialwin32.py", line 55,
in open
raise SerialException("could not open port: %s" % msg)
SerialException: could not open port: (2, 'CreateFile', 'The system
cannot find the file specified.')
--

When I try with 'COM3', which comes inbuilt in my laptop, COM3 is
recognized. Few other posts on the web seem to indicate pyserial
should work fine with virtual serial ports. What am I missing? Please
help.

--Thanks
--NS

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyserial doesn't recognize virtual serial port

2007-10-13 Thread naveen . sabapathy
Hi Grant,
  It worked... I had the same suspicion and changed the port names to
COM2 and COM4 and it worked.

--NS
On Oct 12, 8:34 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-10-12, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >   I am trying to use virtual serial ports to develop/test my serial
> > communication program. Running in to trouble...
>
> >   I am using com0com to create the virtual ports. The virtual ports
> > seem to be working fine when I test it with Hyperterminal.
>
> I'm not sure what you mean by "virtual ports".  I've used
> pyserial with several different network attached devices that
> provide drivers that make them appear as COMnn devices under
> windows.  I never had any problems.
>
>
>
> > I am using the example program that comes with pyserial, as below.
> > ---
> > import serial
> > ser = serial.Serial('CNCA0') #open virtual serial port
> > print ser.portstr#check which port was realy used
> > ser.write("Hello")   #write a string
> > ser.close()  #close port
> > -
>
> > The following is the error message:
>
> > --
> > Traceback (most recent call last):
> >   File "C:\Python25\Naveen Files\TestSerial", line 2, in 
> > ser = serial.Serial('CNCA0') #open first serial port
> >   File "c:\Python25\Lib\site-packages\serial\serialutil.py", line 156,
> > in __init__
> > self.open()
> >   File "c:\Python25\Lib\site-packages\serial\serialwin32.py", line 55,
> > in open
> > raise SerialException("could not open port: %s" % msg)
> > SerialException: could not open port: (2, 'CreateFile', 'The system
> > cannot find the file specified.')
> > --
>
> If you specify a filename that the OS doesn't recognize there's
> nothing pyserial can do about it.
>
> > When I try with 'COM3', which comes inbuilt in my laptop, COM3 is
> > recognized. Few other posts on the web seem to indicate pyserial
> > should work fine with virtual serial ports. What am I missing?
>
> My guess is you're not spelling the device name correctly.
> Device names under Windows are even more screwed up than the
> rest of the OS.  By default there are a limited set of devices
> with specially mapped "DOS compatible" names such as LPT1,
> COM3, etc.  My guess is that the device you're attempting to
> use doesn't have a name that's mapped to the DOS-compatible
> namespace as CNCA0.
>
> You could try using the name \\.\CNCA0
>
> Or you could try to figure otu how to map the device into the
> DOS namespace as CNCA0.
>
> You could also try running some sort of system call trace on
> HyperTerminal to find out what name it's using to open the
> device when you tell it to use port CNCA0.
>
> Or you could just give up and switch to Linux.  [That's what
> I'd recommend, personally.]
>
> --
> Grant Edwards   grante Yow! YOU PICKED KARL
>   at   MALDEN'S NOSE!!
>visi.com


-- 
http://mail.python.org/mailman/listinfo/python-list


MERGE SQL in cx_Oracle executemany

2020-10-12 Thread Naveen Roy Vikkram
Hi there,

I'm looking to insert values into an oracle table (my_table) using the query 
below. The insert query works when the PROJECT is not NULL/empty (""). However 
when PROJECT is an empty string(''), the query creates a new duplicate row 
every time the code is executed (with project value populating as null). I 
would like to modify my query so a new row is not inserted when all column 
values are matched (including when project code is null). 
I'm guessing I would need to include a "when matched" statement, but not too 
sure on how to get this going. Would appreciate help with this, thanks.

```
con = cx_Oracle.connect(connstr)
cur = con.cursor()
rows = [tuple(x) for x in df.values]
cur3.executemany('''merge into my_table
using dual
on (YEAR = :1 and QUARTER = :2 and CODE = :3 and AMOUNT = :4 and DATE = :5 and 
COMMENTS = :6 and PROJECT = :7)
when not matched then insert values (:1, :2, :3, :4, :5, :6, :7)
''',rows)
con.commit()
cur.close()
con.close()
```
-- 
https://mail.python.org/mailman/listinfo/python-list