Author Topic: xref.xml  (Read 7958 times)

0 Members and 1 Guest are viewing this topic.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #15 on: July 11, 2013, 11:04:16 PM »
Just did some more testing. 

When I have one X-ref group within an Action command it appears to honour the global 'optional phrase' but as soon as I nintroduce a second X-ref into the mix the global 'optional phrase' is no longer honoured with either x-refs. 

I've tested this a few times now and it seems to always be the case.  Hope this enlightens..   

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #16 on: July 12, 2013, 08:43:50 AM »
Instead of making the xref optional, why not just make everything in it optional?

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #17 on: July 12, 2013, 11:35:22 AM »
I have.. It's not honouring it..  That is what I'm trying to say..  I obviously need my 'root' commands to stay fixed but everything else should be optional.  Look have you actually tried it.  It works quite well, you seem to be sceptical of it's functionality; I'm confused by that. 

You asked me to test the functionality of x.ref yet I point out a clear issue and somehow I feel as if I'm challenging the obvious. 

Cool, what ever, I will just repeat my adoption of crude 'natural language' to every 'action' command.  It works fine.. It just seems silly, I was just challenging the idea of 'x.ref' as it was to unity the idea of having similar phrases amongst multiple commands. 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #18 on: July 12, 2013, 11:50:31 AM »
Yes I have actually tried it, and setting the phrases in the xref group to optional works.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #19 on: July 12, 2013, 12:21:23 PM »
I said quite far back in this thread:

Quote
I don't know if the xrefs themselves can be set as optional, but the phrases within an xref can be set to optional.

and I'm sticking with that.  I proposed to you a perfectly reasonable solution to your problem that works now, but you don't seem satisfied with that.  What can I do?

I'm not aware of any other issues other than the ones you created by trying the edit the xml by hand.  As far as I know everything is working as it should.  It is also possible that using too many xrefs or xrefs that are too complicated my cause issues.  I also stated that up front, but I have not run into any problems myself.

If you have a specific issue that is not working, I can only advise you on it if you show me a concrete example of what you are actually trying to do.  Then I can determine if something is not working correctly in VC, or if you have simply done something wrong.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #20 on: July 12, 2013, 12:24:06 PM »
I can make it possible to set the xref itself as optional, but it may be a while before I post a new version, so I think it makes more sense to take advantage of the solution that works with the existing version.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #21 on: July 15, 2013, 04:14:33 AM »
What solution.  It is strange as stated if I only use one x.ref in my action command it allows me to not need that particular x.ref stated but as soon as I introduce a second x.ref, I'm required all of a sudden to state at least one command from each x.ref.

So when I have one x.ref, I can assign it globally to be an "optional phrase" but as soon as I introduce a second x.ref I can no longer choose either of the x.refs to be used as an "optional phrase"

I can use multiple x-refs but as soon as I do I am forced to have to use at least one command from each.  This would appear to be an issue.  It is a shame as using the x.refs is a really effective way of unifying the process. 

I hope you can find the time to look into this.  Thanks


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #22 on: July 15, 2013, 07:49:35 AM »
I am happy to look into it, but since I have already tested it and have not run into the same problem, I need you to send me the actual command and the actual XML files that you are referencing in the command.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #23 on: July 15, 2013, 09:58:39 PM »
Okay James.  Will do..  Appreciate it! :D

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #24 on: July 18, 2013, 01:34:23 AM »
Okay so James I resolved the xref issue.  I don't know how.  Though in all honesty though I think yoiur suggestion of just adding each and every individual phrase might be best.  How would I go about this.  I would still like to separate as such though...

Introduction, query, action, required command. 

Introduction "hey, hi, hello" (optional phrase)
Query "can you, could you, would you" (optional phrase)
Action "play me some, listen to some, enjoy some" (optional phrase)
Command "music, comedy, news" (required)

Now clearly I can do this in the editor but I very quickly realised the limit of the characters allowed in the editor.  As example:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<phrase optional="true">can I, could I, would I be able to, can we, could we, would we be able to, can you, could you, would you be able to, I want to, we want to, I want you to, we want you to, I would like you to, we would like you to, I am keen to, we are keen to, I am keen for y</phrase>

I thought maybe "payload from xml" could work and choose the option of not having a value but clearly this is not the case.  I know the software is not really designed for what I'm trying to do but if I could extent the amount of phrasing I'd be able to input it seems very much accurate enough to handle it.  If it can go through 18000 different song titles, I think we can have a 100 different opening phrases which would be way surplus to what I actually require.

Your thoughts. 

PS: Payload dictation seemed very effective, but I could only have about three groups of commands operating at a time. 

A system that would work well for what I'm trying to do is two seperate databases, one for the small irrelevant words to be cross referenced with payload dictatiot.  The "I, am, could, keen, would, we, am, a" etc as a guide for payload dictation and then the action words for the actual commands.

The number of action words I'm using derive from only about 100 different words.  The filler words are only about 100 as well.  Many times the method would come up with the correct words but would get stuck on an alternative command.  I'll attach the file I was using with payload dictation.  See what you think.


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #25 on: July 18, 2013, 08:21:17 AM »
If you resolved the xref issue, why have you now decided not to use it?

Why can't you use a payload XML file?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #26 on: July 18, 2013, 08:32:08 AM »
... I think yoiur suggestion of just adding each and every individual phrase might be best...

When did I say that?  If you can refer me to the post, I can try to explain what I actually meant.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: xref.xml
« Reply #27 on: July 18, 2013, 08:42:02 AM »
I'm not sure what you want me to do with this zip file now, but I am missing the following file:

C:\Users\Production\Desktop\phrase\mixed content.xml

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #28 on: July 18, 2013, 08:48:16 PM »
Quote
Why can't you use a payload XML file?

When I tried, I got the following error.  I added a payload.xml (phrase only) and try and make it optional I would get the following error. 

Code: [Select]
************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'System.String' to type 'VoxCommando.payloadXmlFileInfo'.
   at VoxCommando.editTreeCommands.writeXMLfromLeafNode(TreeNode leafNode, XmlTextWriter writer)
   at VoxCommando.editTreeCommands.writeXMLphrasesFromCommandTreeNode(TreeNode cmdNode, XmlTextWriter writer)
   at VoxCommando.commandBlock.writeCommandXML(XmlTextWriter writer, TreeNode cmdNode)
   at VoxCommando.editTreeCommands.writeXMLcommandsFromGroupNode(TreeNode currentGroup, XmlTextWriter writer, CommandList commandsToSave)
   at VoxCommando.editTreeCommands.writeXMLfromGroupNode(XmlTextWriter writer, TreeNode groupNode, CommandList commandsToSave)
   at VoxCommando.CommandTreeEditorSingle.saveCommandTreeToXML(String filenameToSave)
   at VoxCommando.CommandTreeEditorSingle.saveTree(String strFileSaveName)
   at VoxCommando.CommandTreeEditorSingle.toolStripButtonSaveTree_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: xref.xml
« Reply #29 on: July 18, 2013, 09:01:38 PM »
Quote
In this case the xref could actually help you out a lot because you can create multiple commands, each of which addresses different sentence structures, but my concern here is that when you add this to a whole bunch of commands the system is going to melt down.

In regards to your other commend, this is what I was referring to.  I'm using multiple x-refs and with some very positive resaults.  I also discovered that I can expand on the phrases with an external editor without the limitation.  But if your telling me I can use a payload.xml and refer to it as an "optional phrase" and use more than one in an action command, that would be brilliant.  Just my experience has been that I get the following error when trying to do pretty much anything with payload.xml

Why I also like the idea of payload.xml is that it carries Values with the Phrases so I believe in essense I can cater the response depending on the phrase?  This is correct. 

That would be great as then, I can do the following I presume. 

Phrase "When was this track released" with value "released"
Respone "this track was {value} in 2004"

Phase "When did this track come out" with value "came out"
Response "this track {value} in 2004"

Catering the response to the question more naturally is tantalising.