473,326 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how to parse a S expression and build an binary decision tree?

I want to know how can we parse a string with braces of the form((Question)(Left_Node)(right_node)). The "question" for example will be of the form if segment size < 1.5,then choose left node,else right.The question can be a dictionary with a key and a value.Left and right node represent a complete left or right half tree.Need to recursively parse the tree till the leaf node is reached.In this manner need to build an decision binary. I am working on speech synthesis not of programming background,and am new to this python programming,so looking for help in coding,please suggest methods for implementing this kind??
I need this to test my other part of work for speech synthesis
I was able to build decision tree for normal data from list etc...looking for support on S expression
Please answer...

thanks in advance..
May 24 '10 #1
18 4066
Glenton
391 Expert 256MB
Okay, wow, that's quite a big question. You got any code you're trying, or more specific questions to narrow it down?

1. Parsing the string into usable data.
regular expressions will be your friend here.

2. The tree structure.
I'll give some more thought about this, but the question is basically can you use one of the standard python data structures to hold this kind of thing in a neat way, or do you need to build a data structure to hold it. I suspect a clever useage of defaultdict (from collections) could work.

But I can't write now, I'm afraid!
May 24 '10 #2
@Glenton
Expand|Select|Wrap|Line Numbers
  1. import sys
  2.  
  3. def _gen_tokens(file):
  4.   for line in file:
  5.     line_len = len(line)
  6.     left = 0
  7.  
  8.     while left < line_len:
  9.       c = line[left]
  10.  
  11.       if c.isspace():
  12.         left += 1
  13.       elif c in '()':
  14.         yield c
  15.         left += 1
  16.  
  17.       else:
  18.         right = left + 1
  19.         while right < line_len:
  20.           c = line[right]
  21.           if c.isspace() or c in '()':
  22.             break
  23.  
  24.           right += 1
  25.  
  26.         token = line[left:right]
  27.         if token.isdigit():
  28.           token = int(token)
  29.         yield token
  30.  
  31.         left = right
  32.  
  33. def read_all(file=sys.stdin):
  34.   stack = []
  35.   for token in _gen_tokens(file):
  36.     if token == '(':
  37.       stack.append([])
  38.  
  39.     elif token == ')':
  40.       top = stack.pop()
  41.       if len(stack) == 0:
  42.         yield top
  43.       else:
  44.         stack[-1].append(top)
  45.  
  46.     else:
  47.       stack[-1].append(token)
  48.  
  49.   assert len(stack) == 0
  50.  
  51. def s_expr_to_str(e):
  52.   if type(e) is ListType:
  53.     return '(%s)' % ' '.join(map(s_expr_to_str, e))
  54.   else:
  55.     return str(e)
  56.  
  57. s_expr=(1.0 + 3.5)
  58. # for s_expr in s_expr_gen.read_all():
  59. print s_expr_to_str(s_expr)
basically my type of data will be in S expr form,so this is the code i am trying to parse the S expression.but this code isnt running..it is giving me 2-3 error.would be happy if u can sort this..
As a first step thinking of parsing the expression ,then will see on build a decision tree..
No i guess decision tree is required as it is the one used widely for pattern recognization and classification of large data.

Please find the bug in the above code.

thanks for the reply
May 24 '10 #3
Glenton
391 Expert 256MB
Hi

Starting with the overall objective of making a decision tree. So you have a string with ((Question)(Left_Node)(right_node))
1. Can you tell us if the Question is unique or if there are multiple nodes with the same question?
2. Can you tell us what Left_Node and right_node actually are? Are they references to another question, and if so how is it done?
3. Can you tell us how big the tree is? Ie how efficient does the code need to be?
I'm not disputing that you need a decision tree - I'm just wondering what the best way is of coding it!


Regarding your code, it would be helpful if you told us what the various functions were meant to achieve! Little details make a big difference and we can't really tell. Eg give us an example of how you would run it, what you expect and what you got instead. This will make it more likely that you get reasonable help!

But here for example is some code for a _gen_token function using regular expressions:
Expand|Select|Wrap|Line Numbers
  1. import re
  2.  
  3. def _gen_tokens(myfile):
  4.     pattern=r"\(\((.*)\)\((.*)\)\((.*)\)\)"
  5.     for line in myfile:
  6.         match=re.search(pattern,line.strip())
  7.         if match:
  8.             yield match.group(1)
  9.             yield match.group(2)
  10.             yield match.group(3)
  11.  
  12.  
  13. f=open("T1.txt")
  14. for token in _gen_tokens(f):
  15.     print token
This gives:
Expand|Select|Wrap|Line Numbers
  1. question
  2. leftnode
  3. rightnode
  4. question1
  5. leftnode1
  6. rightnode1
  7. question2
  8. leftnode2
  9. rightnode3
  10. etc...
which I think solves the parsing part of the problem, right? Let us know if that works for you, and if not what the problem is, and if there's anything else.

when run from the same directory as a file T1.txt that looks like this:
Expand|Select|Wrap|Line Numbers
  1. ((question)(leftnode)(rightnode))
  2. ((question1)(leftnode1)(rightnode1))
  3. ((question2)(leftnode2)(rightnode2))
  4. ((question3)(leftnode3)(rightnode3))
  5. ((question4)(leftnode4)(rightnode4))
  6. ((question5)(leftnode5)(rightnode5))
  7. ((question6)(leftnode6)(rightnode6))
  8. ((question7)(leftnode7)(rightnode7))
  9. ((question8)(leftnode8)(rightnode8))
May 25 '10 #4
Glenton
391 Expert 256MB
@kaushik1221
Oh, looking at your _gen_token function I see that you were simply using the name of the file in the "for line in file:" of line 4 (you get it from your stdin). This won't work. You need to use a file object - see the code from my previous post for an example.

This is a classic example of why commenting your code is necessary (I know I didn't with my code ;P). When I read your _gen_token function and saw the line 4 I assumed you were passing a file object. A comment about what you were doing (for yourself in the future and us now) would have made the error obvious!
May 25 '10 #5
I am working on speech synthesis.In this i have a large number of pronunciation for each phone i.e alphabet and need to classify them according to few feature such as segment size(int) and alphabet itself(string) into a smaller set suitable for a particular context. For this purpose,i have decided to use decision tree for classification.the data to be parsed is in the S expression format.eg:((question)(LEFTNODE)(RIGHTNODE)).

example of how question can be at root question can segment size<1.5,if yes left node else right node.again left node might have a question such a segment size <.8,for further clasification of pronunciation or may have a diff question such as alphabet = "a"..
question wil be different at each node.
left and right node which have whole part of left tree and right tree respectively..

I am giving u a sample of file,which is my target to parse and build the decision tree is here.

((segment_duration < 0.145)
((n.ph_cvox is -)
((n.ph_vfront is 3)
((p.ph_cplace is v)
((segment_duration < 0.119999)
((p.name is en:)
((((253 9.2873) (267 8.75463) (269 9.66194) (312 8.5538) (384 12.0333) (467 10.9705) (496 10.078) (503 12.0626) (565 9.90752) (581 9.75047) (628 11.2111) (710 9.70235) (746 9.18527) (780 8.73101) (891 9.45934) (901 9.50958) (905 8.82014) (1002 10.4217) (1214 12.9305) (1410 9.78915) (1680 10.6755) (1690 10.4012) (1698 9.17619) (1847 11.0898) (2055 9.69433) (2141 10.4624) (2276 9.80647) (2342 11.8977) (2346 11.8854) (2395 9.69119) (2450 12.8875) (2481 9.93514) (2491 13.5101) (2527 11.7152) (2739 10.2178) (2809 9.32473)) 10.3664))
((p.name is an:)
((((56 10.7208) (108 9.96128) (192 12.9366) (219 9.62509) (262 9.67294) (299 10.6707) (303 9.27964) (306 9.93745) (313 10.1076) (348 10.7988) (354 9.1955) (403 10.9634) (408 10.3513) (533 10.7836) (569 11.7902) (618 9.58224) (696 8.51287) (708 10.6939) (769 10.6282) (791 10.4681) (792 12.8401) (823 10.9245) (861 11.3897) (880 8.44017) (945 10.6206) (1015 9.53572) (1029 9.73096) (1257 9.61424) (1611 11.9002) (1999 10.3606) (2012 9.60825) (2688 9.17272) (2903 12.7348)) 10.4107))
((((74 12.7488) (392 12.9928) (402 13.958) (495 12.6443) (539 10.8991) (754 11.8237) (831 12.5241) (1039 9.25672) (1325 11.1247) (1383 13.317) (1653 11.2169) (1822 10.6504) (1831 10.1751) (1916 11.5109) (2047 12.5661) (2189 11.7423) (2244 11.3622) (2312 12.2735) (2340 11.0929) (2500 12.4542) (2961 11.5023)) 11.8017))))
((R:SylStructure.parent.parent.R:Word.p.gpos is 0)
((((59 7.99577) (65 8.07265) (82 9.05552) (117 8.04792) (168 7.55799) (189 11.229) (206 9.65302) (216 7.95128) (238 7.21761) (287 7.84751) (317 11.4078) (370 8.85067) (378 12.0625) (410 10.4587) (421 9.69372) (462 9.31811) (497 10.5316) (516 7.84422) (527 8.38548) (540 8.24113) (564 7.79119) (575 9.11389) (656 8.65479) (667 11.5971) (692 7.78092) (734 9.50851) (742 7.21358) (743 7.74665) (788 8.2656) (805 8.52475) (833 7.86942) (842 9.54321) (866 8.77619) (890 7.56151) (944 8.03321) (987 11.184) (1042 8.13802) (1447 8.64641) (1598 10.1785) (1607 11.7318) (1618 9.42431) (2021 11.203) (2088 8.42375) (2120 10.4004) (2137 10.7255) (2156 12.4177) (2158 9.69772) (2488 7.10815) (2591 13.2943) (2612 11.102)) 9.26156))
May 25 '10 #6
Glenton
391 Expert 256MB
Hi. I'm sorry to be dense, but I'm struggling to see how this is a
((question)(leftnode)(rightnode)) format?

Can you take us through the meaning of what you've got here a bit more?

Also, where are the line breaks, and what do they mean?

And what is the end product you're after. Sure, a decision tree, but for printing graphically, or for a computer program to go through step by step or what?
May 25 '10 #7
@Glenton
Basically,assume that there are 10,000 toys and there is need for classifying them and there are different question need to be answers to categories them,so that each leaf has just around 20 toys of one type..
my aim is given a toy along with its few feature which will help in categorizing it,the computer should parse through the decision tree build for 10,000 toys and give a result only the leaf node contents for the given toy category inputed earlier by checking its feature..
I guess should be clear by now,it is similar like simplifying the search by now searching from instead of 10,000 toys,from only 20.


The sample i gave is in that format but recursively i guess:
((Question)
((LEFT NODE CONTENT:question at left node if left node is selected from root node)
((few more question = to the depth of the tree as 1 question parse increses the depth by 1) and so on not only questions but also left and right part at that node )))
((Right NODE CONTENT::question at right node if right node is selected from root node)
((few more question = to the depth of the tree as 1 question parse increses the depth by 1) and so on not only question but left & right part at that node)))


it is similar pattern recursively at each node and each node has a list of the toys in that particular category such a after one question answered there will be 5000 toys on left node category and 5000 on right node category..

((Question)((L1:Question)((L2:Question)(L2:left leaf)(L2:right leaf))(L1:left child)(L1:right child))((R1:Question)((R2:Question)(R2:left leaf)(R2:right leaf))(R1:left child)(R1:right child))

should be clear now i guess,
please help me,not having a clue for building a decision tree..
If not able to understand my requirement still.
tell me how to do with what u got,i wil try to make changes to suit my need..
at present i am clueless in building the decision tree.please suggest methods.

Sorry if my question previously given wasnt clear..earlier i wanted to be simple now i elaborated my whole problem.
thank u
May 25 '10 #8
Glenton
391 Expert 256MB
I had understood most of that already.

But if I understand correctly, there should be at most 3 brackets in a row at the lowest level. Eg in your example:
((Question)((L1:Question)((L2:Question)(L2:left leaf)(L2:right leaf))(L1:left child)(L1:right child))((R1:Question)((R2:Question)(R2:left leaf)(R2:right leaf))(R1:left child)(R1:right child))

L2 has the form ((...)(...)(...)), while L1 also has that form, and the second bracket is just L2.

But in your actual example data you have many (...) in a row. How are you suppose to tell what those all mean? And it ends with (2612 11.102)) 9.26156), so the last number doesn't seem to have an open bracket.

In short the example structure you give is not compatible with your explanation.

Actually, even your simple example doesn't make much sense when looked at in detail.
Here's my picture understanding
Expand|Select|Wrap|Line Numbers
  1.                                 Q
  2.                        /                  \
  3.                   Q0                      Q1
  4.              /       \                       /      \
  5.      Q00           Q01          Q10           Q11
  6.     /      \         /      \        /       \        /      \
  7. A000 A001 A010 A011 A100 A101 A110 A111
  8.  
I'm drawing this out in painful detail because we seem not to be getting each other. Obviously in this example they all go down to the bottom level, but you could have A11 and get rid of A110 and A111. Is this understanding of the decision tree structure correct?

Now to convert this to the format you've got it would be like this:
Expand|Select|Wrap|Line Numbers
  1. (
  2.   (Q)
  3.   (
  4.      (Q0)
  5.      (
  6.         (Q00)
  7.         (A000)
  8.         (A001)
  9.      )
  10.      (
  11.         (Q01)
  12.         (A010)
  13.         (A011)
  14.      )
  15.   )
  16.   (
  17.      (Q1)
  18.      (
  19.         (Q10)
  20.         (A100)
  21.         (A101)
  22.      )
  23.      (
  24.         (Q11)
  25.         (A110)
  26.         (A111)
  27.      )
  28.   )
  29. )
  30.  
I'm tab formatting it to (hopefully) make it clearer. This is clearly a recursive structure.

Now here is yours (I've changed the labelling to be consistent):
Expand|Select|Wrap|Line Numbers
  1. (
  2.    (Q)
  3.    (
  4.       (Q0)
  5.       (
  6.          (Q00)
  7.          (A000)
  8.          (A001)
  9.       )
  10.       (???L1:left child)
  11.       (???L1:right child)
  12.    )
  13.    (
  14.       (Q1)
  15.       (
  16.          (Q10)
  17.          (Q100)
  18.          (Q101)
  19.       )
  20.       (???R1:left child)
  21.       (???R1:right child)
  22.    )
  23.  
There appears to be a mismatch of questions and answers ((total number of questions) should equal (total number of answers minus 1)). Eg Q0 and Q1 (corresponding to your L1 and R1) both have 3 answers at the same level.

So I ask again will you please explain your existing data structure (without assuming I'm an idiot, but being more precise)
May 25 '10 #9
Glenton
391 Expert 256MB
By the way, with the structure as I made it, it's relatively easy to make a decision tree.

With a text file like this:
Expand|Select|Wrap|Line Numbers
  1. (
  2.   (Q)
  3.   (
  4.      (Q0)
  5.      (
  6.         (Q00)
  7.         (A000)
  8.         (A001)
  9.      )
  10.      (
  11.         (Q01)
  12.         (A010)
  13.         (A011)
  14.      )
  15.   )
  16.   (
  17.      (Q1)
  18.      (
  19.         (Q10)
  20.         (A100)
  21.         (A101)
  22.      )
  23.      (
  24.         (Q11)
  25.         (A110)
  26.         (A111)
  27.      )
  28.   )
  29. )
  30.  
You can run this code:
Expand|Select|Wrap|Line Numbers
  1. import re
  2.  
  3. def questionAndNodes(s):
  4.     """extracts Q, A0 and A1 from a bottom level pattern
  5.     of form (Q)(A0)(A1)"""
  6.     pattern=r"\((.*)\)\((.*)\)\((.*)\)"
  7.     match=re.search(pattern,s.strip())
  8.     if match:
  9.         return match.group(1), match.group(2), match.group(3)
  10.  
  11. #Create continuous string out of file
  12. f=open("T1.txt")                 #file with the string
  13. s=""
  14. for line in f:
  15.     s+=line.strip().replace(") (",")(")              #create one long string from file"
  16. f.close()
  17.  
  18.  
  19. #Dictionary of questions with nodes
  20. tree=dict()
  21.  
  22. #Pattern for finding bottom level  (...)(...)(...), where ... has no brackets.
  23. pattern1=r"\([^()]*\)\([^()]*\)\([^()]*\)"
  24.  
  25. while True:
  26.     print "*****************"
  27.     myfindall=re.findall(pattern1,s)  #Find all bottom nodes
  28.     if len(myfindall)==0: break          #If there aren't any more quit
  29.     for v in myfindall:
  30.         q,l,r=questionAndNodes(v)     #extract the question and nodes
  31.         print q, l, r                             
  32.         tree[q]=[l,r]                           #Add the nodes to the dictionary
  33.         s=s.replace(v,q)                #replace the whole node with the question
  34.  
  35. print tree
  36.  
  37. def myask(q,tree):
  38.     "Recursive function for navigating down the tree"
  39.     if q in tree.keys():
  40.         print "Question:"
  41.         print q
  42.         ans=raw_input("Enter 0, 1, or (q)uit: ")
  43.         while ans not in "01qQ":
  44.             ans=raw_input("Invalid answer. Enter 0, 1, or (q)uit: ")
  45.         if ans=="q":
  46.             print "User quit"
  47.         if ans=="0":
  48.             myask(tree[q][0],tree)
  49.         if ans=="1":
  50.             myask(tree[q][1],tree)
  51.     else:    
  52.         print "End.  Answer:"
  53.         print q
  54.  
  55. #Initialise the function with the top node question "Q"
  56. myask("Q",tree)
  57.  
Presumably this isn't what you want. :,(

But it's kinda cool!
May 25 '10 #10
@Glenton
Hey,sorry its was a common mistake made by both of us..I forgot to mention that the leaf node will have different format.as there will be no question in it.and only list to stored..i.e the reason we need to check everytime while parsing whether it is leaf node or not..the last value which does not start with an opening left parenthesis is of no use to me and can be ignored..
In the sample given the information is in the format of ( X Y)co ordinates of which only X is the information of need to be stored in the decision tree.

thank you very much for the support given


Now answer to your previous post,ya i think i made a mistake i meant the same structure what you have showed,except that have to check whether it is a leaf node or not to coz it wil have a different format.
how can we discard the one which does not start with parenthesis??
how to store the information at each node ??

The code looks seriously cool,but ya doesnt satisfy my requirement..
I want the system to automatically parse the decision tree,and give me and display of content of the leaf node..
Assuming the input will be a letter "a" with feature such as an list ( 'seg_size','pitch','width') .match them to the question at each level and answer them and parse till the leaf :)
May 25 '10 #11
Glenton
391 Expert 256MB
I'm sure I can help if you help me understand what the structure is.
May 25 '10 #12
ya trying to get a better way of understanding the structure my self and for giving good explanation...will get back in some time...thanks for giving supports and confidence
May 25 '10 #13
@Glenton
The structure is pretty much the same what is told you.
for normal node:((Question)(left node)(right node))
for leaf(content)..you may see in the sample where there are two separate sets with only values and no question in between within some braces(((( ))))
Please dont give much stress on the structure..
Help me in building the decision tree,which will parse the information and display the contents of leaf nodes..
i guess this can be using data structure concepts.


def parse( node )
check if leaf
if yes:parse the leaf,create object,create object pointer
return an object pointer
Else :
question: parse(1st field)
left: parse(2nd field)
right: parse(3rd field)
these three can be made a class called binary_decision_node and return current object identifier
we should perform this recursively called until leaf node is reached.

While parsing have to store the content of format(X Y) in some list,index etc and also store the questions in some field to answer

atlast we should have all pointer to traverse from root to the leaf.

i have this kind of concept in mind but as new to python not able to implement this looking forward for your help in programming this..
Please help...
May 25 '10 #14
Glenton
391 Expert 256MB
Have you tried the program I wrote a couple of posts back? I think it works very well. The basic structure is a dictionary with entries like this:
d[Q] = [QL,QR] for normal nodes, and
d[Q] = [AL,AR] for leaf nodes.

Therefore to navigate it, you start with d[Q], and depending on your answer to that you move to d[QL] or d[QR].

Please look at that example in detail and if it doesn't work for you, please let me know why.

There's also some details about parsing the structure from a string to the dictionary. I'm relatively confident that tweaking that for your irregular leaves will not be too difficult.

Anyway, maybe you can have a detailed look at that, and come back with questions and a way forward.
May 26 '10 #15
@Glenton
hello,
how to traverse a binary decision tree. given a tree,i want know how can we travesre from root to required leaf the feature of the required leaf are given in an dictionary form assume and have to traverse from root to leaf answering the questions at each node with the details given in feature list.. the decision tree node has format ((question)(left tree)(right tree)) while traversing it should answer question at each node and an choose left or right and traverse till leaf?
May 26 '10 #16
Glenton
391 Expert 256MB
So I understand you're thinking of a recursive structure where your format is question-left tree-right tree. But I think it would be far easier to represent each tree by the question at the top of that tree. So the question is a kind of short cut to the whole tree. I don't know if you've had a chance to go through the example I gave above?
- The first 35 lines converts from a string format to a dictionary format
- Then there's a relatively simple recursive function that transverses the dictionary format tree
- You initiate this decision process by simply asking a question. Because the question represents the whole tree underneath it! It's efficient, clean and tidy!

Let's make a simple example:
Expand|Select|Wrap|Line Numbers
  1.                   Q
  2.              /         \
  3.       Q0               Q1
  4.      /   \              /   \
  5. A00    A01   A10   A11
  6.  
In our dictionary format this would be represented by a dictionary with all the questions as keys. Suppose the dictionary is called tree:
Expand|Select|Wrap|Line Numbers
  1. tree[Q]   =   [QL, QR]
  2. tree[QL]   =   [ALL, ALR]
  3. tree[QR]   =   [ARL, ARR]
Now you can traverse this tree by going until the response is no longer in the dictionary key - at that point it's an answer.
1. You ask Q, and get L or R. You also put Q into your dictionary and get [QL,QR]. These are matched, so if your answer to Q is L, your next question is QL, and if the answer is R, your next question is QR.
2. Let's suppose that you answer L. Then the tree dictionary tells you that your next question is QL. So you put QL as the key to the tree dictionary.
3. tree[QL] = [ALL,ALR], so you're back at step 1 essentially. You now ask QL, and answer L or R. You also put QL as the key to your tree dictionary and get [ALL, ALR]. These are matched again just like step 1.
4. Let's suppose that the answer is R, so ALR is our next response.
5. If we try to put tree[ALR] we realise that ALR is not a key to this dictionary. So that tells us we've reached the end, and ALR is the final response, ie the leaf.

***********************************

I suppose you want to automate the answering of the questions also. This too shouldn't be a problem once you know the format of the feature list and the format of the questions. I don't know these, so can't help you at the moment.
May 26 '10 #17
format of the Question will be such as segment_size <.45,or like ph.name is a;

format of feature will be
num segment_size pitch width ph.name
1 .5 34 55 a
2 .30 44 22 c etc

i am new to python so i am looking for code..i am able to visualize but cant write the code...
please help...
give me the entire code for traversing to required leaf by automatic travesing
May 26 '10 #18
Glenton
391 Expert 256MB
I expect you've got enough to go on for now. I'd recommend that you write out your key steps (the ones you can visualise) and then take them one at a time. Write back with any more specific questions.

Good luck
May 26 '10 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: j | last post by:
Hi, Anyone out there with binary search tree experience. Working on a project due tomorrow and really stuck. We need a function that splits a binary tree into a bigger one and smaller one(for a...
3
by: tsunami | last post by:
hi all; I have an array and want to insert all the elements from this array to a binary search tree.That array is an object of the class of a stringtype which includes overloaded "< > = =="...
2
by: dannielum | last post by:
Hi all, I am trying to write a Binary Search Tree that each of its node will have 3 node pointers: left, right and parent. I need a parent pointer for some the purpose of my project. Without the...
4
by: Tarique Jawed | last post by:
Alright I needed some help regarding a removal of a binary search tree. Yes its for a class, and yes I have tried working on it on my own, so no patronizing please. I have most of the code working,...
3
by: Nick Kiguta | last post by:
I have two classes, a Node class and a Bstree class. The Bstree class contains a pointer to a Node class as one of its private members. Now I need to build a binary search tree from multiple...
1
by: hn.ft.pris | last post by:
I have the following code: Tree.h defines a simple binary search tree node structure ########## FILE Tree.h ################ #ifndef TREE_H #define TREE_H //using namespace std; template...
11
by: Defected | last post by:
Hi, How i can create a Binary Search Tree with a class ? thanks
1
by: Federico | last post by:
Hi I've some trivial question: for exercise I want to parse a string that like this: "x -34 + 65 * 96 = 102" now if I had this ("(25+24)/2") is extremely easy to have a result but I want to...
7
by: kwstriker299 | last post by:
Today in class, my professor posed an interesting question for us to think about before our next class. If you insert items that are in ascending order into a binary search tree, then you will build...
5
by: nehap | last post by:
I am doing project in DataMining.Can I get the source code for Binary Decision Tree algorithm in JAVA using some Dataset?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.