Author Topic: Additional Tagging & Reporting Tools  (Read 1205574 times)

hiccup

  • Hero Member
  • *****
  • Posts: 9172
why would you expect "Test the Title: The NYC Song"? word separators are just word separators. they are only custom addition to spaces. and it's senseless in this case because there is an already space after the colon. what i can do is add new parameter "override all exception after chars". or change the meaning of the existing last parameter (which seems useless anyway) to this.

What I mostly meant by 'I would expect', is that it would be desirable to have it work this way from a linguistic point of view.
(and I assumed that's what this parameter was intended for. But I now realise that I misunderstood that)

From a linguistic point of view:
You can have titles such as:

the waltz: the first part
or
an adventure - a beginning

For parameter 2 (lower_case_words), you would set the words a, an, and the to be lower-case.
That would give you:
The Waltz: the First Part
and
An Adventure - a Beginning
(correct?)

But for English titles it should be:
The Waltz: The First Part
and
An Adventure - A Beginning
(I think?)

So I guess I was (wrongly) assuming that parameter 2 (word_separators) was checking for separator character+space.
But I now understand it is not, and it is meant for words like Non-Stop.
My misunderstanding.

----

I am not sure about this new 'overrule' parameter. Would this make it possible to do what I described above?
Would it perhaps be better to have a parameter named something like 'sentence_connector' instead?
(native English speakers, please propose a better term for this?)
One that will work identical to word_separator, but internally adds a space to the separator?

This parameter is only needed because it must be able to overrule any lower_case_words.
Since as you said, it is unnecessary for all others.

edit:
If you agree with this, perhaps change 'word_separator' to 'word_connector'?
Then there would be:
word_connector
sentence_connector

Seems better, more descriptive to me?
Last Edit: July 27, 2024, 06:16:34 AM by hiccup

boroda

  • Hero Member
  • *****
  • Posts: 5308
What I mostly meant by 'I would expect', is that it would be desirable to have it work this way from a linguistic point of view.
(and I assumed that's what this parameter was intended for. But I now realise that I misunderstood that)
...

all this doesn't matter. we understood each other.

I am not sure about this new 'overrule' parameter. Would this make it possible to do what I described above?
Would it perhaps be better to have a parameter named something like 'sentence_connector' instead?
(native English speakers, please propose a better term for this?)
One that will work identical to word_separator, but internally adds a space to the separator?
....

i've only changed how this parameter works. i don't have any "official" parameter name yet. of course, i'm open to any good suggestions.

boroda

  • Hero Member
  • *****
  • Posts: 5308
Could someone direct me to a guide on creating presets that a not so savvy person might understand. I'm trying to recreate this preset i used a lot in mediamonkey


the screenshot is too small. i can't read anything on it.

boroda

  • Hero Member
  • *****
  • Posts: 5308
I am not sure about this new 'overrule' parameter. Would this make it possible to do what I described above?
Would it perhaps be better to have a parameter named something like 'sentence_connector' instead?
(native English speakers, please propose a better term for this?)
One that will work identical to word_separator, but internally adds a space to the separator?
....

'sentence_connector' is a bad choice because it turns off the lowercase list. it's more that simply 'connecting sentence'.

Dizza17

  • Full Member
  • ***
  • Posts: 192
@ aiagm

Without it being in front of me, that looks similar to a preset ASR. Find which one is closest to what you’re looking for then click copy. This will generate a new version that you can edit to suit your needs.
Hope this helps
Cheers Aaron
When the rich wage war, it’s the poor who suffer.

boroda

  • Hero Member
  • *****
  • Posts: 5308
@hiccup, actually the new parameter must not turn off the lowercase word list only, but also "except for words between chars" exclusion. though i haven't checked this yet.

boroda

  • Hero Member
  • *****
  • Posts: 5308
@aiag, you can search preset names (any parts of name) in the upper field. not sure if it's helpful to you.

hiccup

  • Hero Member
  • *****
  • Posts: 9172
'sentence_connector' is a bad choice because it turns off the lowercase list. it's more that simply 'connecting sentence'.
I'm not sure it's bad.
It is describing the situation where you would want to use it.
And you would use it when there are two somewhat independent sentences in one title. Connecting them, and yet separating them by a special character and both of them starting with a capital letter.
So from a user's standpoint accustomed to 'natural language' it makes sense to me, but I can imagine from a developer's point of view you want a more technical description.
That's obviously up to you.


@hiccup, actually the new parameter must not turn off the lowercase word list only, but also "except for words between chars" exclusion. though i haven't checked this yet.
That new parameter indeed seems to be able to do what I was describing for 'sentence connector".
I don't understand exactly what you mean by it also excluding "except for words between chars".
Could you give one or two practical examples of titles where this would function on?
(there are many types of stuff that can be in between brackets in titles, so this probably won't be very straightforward)

boroda

  • Hero Member
  • *****
  • Posts: 5308
I'm not sure it's bad.
It is describing the situation where you would want to use it.
And you would use it when there are two somewhat independent sentences in one title. Connecting them, and yet separating them by a special character and both of them starting with a capital letter.

if you mean that 1st word of new sentence must be capitalized always (ignoring lowercase list), then i agree with you. it's like connecting 2 sentences.

@hiccup, actually the new parameter must not turn off the lowercase word list only, but also "except for words between chars" exclusion. though i haven't checked this yet.
I don't understand exactly what you mean by it also excluding "except for words between chars".
Could you give one or two practical examples of titles where this would function on?

$TitleCase syntax:

$TitleCase(string,lower_case_words,upper_case_words,word_separators,lower_case_between_chars_opening_list,lower_case_between_chars_closing_list,sentence_connector)

i mean that if 'sentence_connector' (?) encountered between char from 'lower_case_between_chars_opening_list' and char from 'lower_case_between_chars_closing_list' then the next word (and only the next word) after 'sentence_connector' will be capitalized. haven't checked this.

p.s. no, i don't want any technical parameter names. i'm using technical names internally in source code. the question is what are descriptive names for users (e.g. in help file).

hiccup

  • Hero Member
  • *****
  • Posts: 9172
i mean that if 'sentence_connector' (?) encountered between char from 'lower_case_between_chars_opening_list' and char from 'lower_case_between_chars_closing_list' then the next word (and only the next word) after 'sentence_connector' will be capitalized. haven't checked this.
Do you mean a title such as:
main title (a sentence 1 - a sentence 2)
?

I checked, but I don't have any titles like that in my library, but maybe you have?
edit, I found one (and only one):
Lament (medley: take 2)
But I don't think that would benefit from this sentence_connector(?) function.
---

About the description of the functions, for now my vote would still go to having:

word_connector
and
sentence_connector

Perhaps other members with some fine-tuned sense of propper englisj and/or interest in this topic (such as phred and karbock) can chip in with some ideas?
Last Edit: July 27, 2024, 10:20:53 AM by hiccup

Dizza17

  • Full Member
  • ***
  • Posts: 192
@Dizza17, ok, i've checked the code, it seems good. could you give me an example of roles and artists tag, so i can check what is happening in debugger?

Boroda,
i can see what the issue is now, the preset is currently set to sort involved people in the 'artist' tag. i keep all the technical role tags in the 'involved people list' tag which i have set as a custom tag. Are you  able to make it work for that field? See attached screenshot for clarity.
https://imgur.com/a/PPcyxIn
When the rich wage war, it’s the poor who suffer.

boroda

  • Hero Member
  • *****
  • Posts: 5308
i mean that if 'sentence_connector' (?) encountered between char from 'lower_case_between_chars_opening_list' and char from 'lower_case_between_chars_closing_list' then the next word (and only the next word) after 'sentence_connector' will be capitalized. haven't checked this.
Do you mean a title such as:
main title (a sentence 1 - a sentence 2)
?

I checked, but I don't have any titles like that in my library, but maybe you have?
edit, I found one (and only one):
Lament (medley: take 2)
But I don't think that would benefit from this sentence_connector(?) function.

yes, but i don't speak about any benefit. i've just discovered one more "exceptions override".

About the description of the functions, for now my vote would still go to having:

word_connector
and
sentence_connector

Perhaps other members with some fine-tuned sense of propper englisj and/or interest in this topic (such as phred and karbock) can chip in with some ideas?

after some thinking i believe that maybe 'sentence_separator' will be better. in fact the next word after 'sentence_separator' is treated as the first word of new sentence applying all corresponding rules to it, e.g. ignoring lowercase word list. i.e. 'sentence_separator' starts new sentence. what do you think about this?

hiccup

  • Hero Member
  • *****
  • Posts: 9172
after some thinking i believe that maybe 'sentence_separator' will be better.
I think I agree, there are indeed two (sort of) 'separate' sentences.

I'm still in two minds about 'word_splitter'
You could argue that the dash in a term such as Non-Stop 'connects' two words (compared to "Non Stop" where there are two separate words)
So to me word_connector feels slightly better. But it's all good.

hiccup

  • Hero Member
  • *****
  • Posts: 9172
I'm not sure if this is a bug, or some intentional and necessary evil, but I find it annoying ;-)
When creating a new preset, it's not possible to open the dropdown menu to select the tag(s) that you want to use.


Only after messing around with fields such as '<Tag 1> is', 'corresponds to' etc. and setting something there, these drop-down menus becomes available.
But I noticed that even after having completed such a preset, sometimes when trying to modify that preset, the drop-down menus again are unavailable, and I need to mess around and change the settings of the above fields again, before the menus become available again.
Still happening with 8.2.8974, and it's still annoying  ;-)   (smiley)
(and no, I'm not applying skin colours to AT&RT)

hiccup

  • Hero Member
  • *****
  • Posts: 9172
Trying out some stuff (with an admittedly worn-out test version of MusicBee 3.6) and AT&RT (8.2.8974) I got this error report.

I have no clue at all if this is something pertaining to the plugin or to MusicBee.
(or perhaps to my messed-up test version of MB)



Code
MusicBee v3.6.8968.33204P  (Win10.0), 27 Jul 2024 17:53:


System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.get_Width()
   at System.Drawing.Image.get_Size()
   at System.Windows.Forms.PictureBox.GetPreferredSizeCore(Size proposedSize)
   at System.Windows.Forms.Control.GetPreferredSize(Size proposedSize)
   at System.Windows.Forms.Layout.TableLayout.GetElementSize(IArrangedElement element, Size proposedConstraints)
   at System.Windows.Forms.Layout.TableLayout.InflateColumns(ContainerInfo containerInfo, Size proposedConstraints, Boolean measureOnly)
   at System.Windows.Forms.Layout.TableLayout.ApplyStyles(ContainerInfo containerInfo, Size proposedConstraints, Boolean measureOnly)
   at System.Windows.Forms.Layout.TableLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
   at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
   at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.TableLayoutPanel.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
   at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
   at System.Windows.Forms.Control.ControlCollection.Remove(Control value)
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
   at MusicBeePlugin.CustomComboBox.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at MusicBeePlugin.PluginWindowTemplate.Dispose(Boolean disposing)
   at MusicBeePlugin.AsrPresetEditor.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at MusicBeePlugin.AdvancedSearchAndReplace.editPreset(Preset preset, Boolean itsNewPreset, Boolean readOnly)
   at MusicBeePlugin.AdvancedSearchAndReplace.buttonEdit_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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)