people tags #387

This commit is contained in:
Hamid Reza Mohammadi 2026-10-02 08:06:26 +03:30
parent 0e275bc97e
commit 433cffa5ae
9 changed files with 62 additions and 3 deletions

View File

@ -32,6 +32,8 @@
case PersonAffiliationType.Servant: return "خدمتگزار"; case PersonAffiliationType.Servant: return "خدمتگزار";
case PersonAffiliationType.Companion: return "همدم"; case PersonAffiliationType.Companion: return "همدم";
case PersonAffiliationType.Successor: return "جانشین"; case PersonAffiliationType.Successor: return "جانشین";
case PersonAffiliationType.Panegyrized: return "مدح‌گو";
case PersonAffiliationType.Satirized: return "هجوگو";
case PersonAffiliationType.Other: return "نوع دیگر"; case PersonAffiliationType.Other: return "نوع دیگر";
default: return t.ToString(); default: return t.ToString();
} }

View File

@ -262,6 +262,8 @@
'<option value="Patron">حامی</option>' + '<option value="Patron">حامی</option>' +
'<option value="Ally">متحد</option>' + '<option value="Ally">متحد</option>' +
'<option value="Rival">رقیب</option>' + '<option value="Rival">رقیب</option>' +
'<option value="Panegyrized">مدح‌گو (طرف اول، طرف دوم را مدح کرده)</option>' +
'<option value="Satirized">هجوگو (طرف اول، طرف دوم را هجو کرده)</option>' +
'<option value="Other">سایر</option>' + '<option value="Other">سایر</option>' +
'</select>' + '</select>' +
'</div>' + '</div>' +

View File

@ -94,6 +94,10 @@ else
<option value="Patron_Subject">این شخصیت از او حمایت می‌کرد (حامی او بود)</option> <option value="Patron_Subject">این شخصیت از او حمایت می‌کرد (حامی او بود)</option>
<option value="Successor_Other">او جانشین این شخصیت شد (پس از او آمد)</option> <option value="Successor_Other">او جانشین این شخصیت شد (پس از او آمد)</option>
<option value="Successor_Subject">این شخصیت جانشین او شد (پس از او آمد)</option> <option value="Successor_Subject">این شخصیت جانشین او شد (پس از او آمد)</option>
<option value="Panegyrized_Other">او در شعری این شخصیت را مدح/ستایش کرد (مدح‌گوی او بود)</option>
<option value="Panegyrized_Subject">این شخصیت در شعری او را مدح/ستایش کرد (مدح‌گوی او بود)</option>
<option value="Satirized_Other">او در شعری این شخصیت را هجو کرد (هجوگوی او بود)</option>
<option value="Satirized_Subject">این شخصیت در شعری او را هجو کرد (هجوگوی او بود)</option>
<option value="Ally">با او متحد/هم‌پیمان بود</option> <option value="Ally">با او متحد/هم‌پیمان بود</option>
<option value="Rival">با او رقیب/دشمن بود</option> <option value="Rival">با او رقیب/دشمن بود</option>
<option value="Companion">با او همراه/همدم بود</option> <option value="Companion">با او همراه/همدم بود</option>

View File

@ -148,8 +148,9 @@ namespace GanjooRazor.Areas.User.Pages
// OtherIsPerson1/SubjectIsPerson1 pairs translate the direction-aware choice into the // OtherIsPerson1/SubjectIsPerson1 pairs translate the direction-aware choice into the
// symmetric Person1Id/Person2Id pair, following the direction each PersonAffiliationType // symmetric Person1Id/Person2Id pair, following the direction each PersonAffiliationType
// value's own doc comment defines (Minister/Advisor/Courtier/Servant: Person1 is the // value's own doc comment defines (Minister/Advisor/Courtier/Servant: Person1 is the
// subordinate one; Patron/Successor: Person1 is the patron/later one; Ally/Rival/ // subordinate one; Patron/Successor: Person1 is the patron/later one; Panegyrized/
// Companion/Other: symmetric, direction doesn't matter) // Satirized: Person1 is the poet; Ally/Rival/Companion/Other: symmetric, direction
// doesn't matter)
switch (AffiliationKind) switch (AffiliationKind)
{ {
case "Minister_Other": // the other person served as minister to this one case "Minister_Other": // the other person served as minister to this one
@ -212,6 +213,26 @@ namespace GanjooRazor.Areas.User.Pages
suggestion.Person2Id = OtherPersonId; suggestion.Person2Id = OtherPersonId;
suggestion.SuggestedAffiliationType = PersonAffiliationType.Successor; suggestion.SuggestedAffiliationType = PersonAffiliationType.Successor;
break; break;
case "Panegyrized_Other": // the other person (a poet) wrote praise poetry about this one
suggestion.Person1Id = OtherPersonId;
suggestion.Person2Id = personId;
suggestion.SuggestedAffiliationType = PersonAffiliationType.Panegyrized;
break;
case "Panegyrized_Subject": // this person (a poet) wrote praise poetry about the other one
suggestion.Person1Id = personId;
suggestion.Person2Id = OtherPersonId;
suggestion.SuggestedAffiliationType = PersonAffiliationType.Panegyrized;
break;
case "Satirized_Other": // the other person (a poet) wrote satirical poetry about this one
suggestion.Person1Id = OtherPersonId;
suggestion.Person2Id = personId;
suggestion.SuggestedAffiliationType = PersonAffiliationType.Satirized;
break;
case "Satirized_Subject": // this person (a poet) wrote satirical poetry about the other one
suggestion.Person1Id = personId;
suggestion.Person2Id = OtherPersonId;
suggestion.SuggestedAffiliationType = PersonAffiliationType.Satirized;
break;
case "Ally": case "Ally":
suggestion.Person1Id = personId; suggestion.Person1Id = personId;
suggestion.Person2Id = OtherPersonId; suggestion.Person2Id = OtherPersonId;

View File

@ -64,6 +64,8 @@ else
<option value="@((int)PersonAffiliationType.Servant)">خدمتگزار (طرف اول، خدمتگزار طرف دوم است)</option> <option value="@((int)PersonAffiliationType.Servant)">خدمتگزار (طرف اول، خدمتگزار طرف دوم است)</option>
<option value="@((int)PersonAffiliationType.Patron)">حامی (طرف اول، حامی طرف دوم است)</option> <option value="@((int)PersonAffiliationType.Patron)">حامی (طرف اول، حامی طرف دوم است)</option>
<option value="@((int)PersonAffiliationType.Successor)">جانشین (طرف اول، جانشین طرف دوم است)</option> <option value="@((int)PersonAffiliationType.Successor)">جانشین (طرف اول، جانشین طرف دوم است)</option>
<option value="@((int)PersonAffiliationType.Panegyrized)">مدح‌گو (طرف اول، طرف دوم را مدح کرده است)</option>
<option value="@((int)PersonAffiliationType.Satirized)">هجوگو (طرف اول، طرف دوم را هجو کرده است)</option>
<option value="@((int)PersonAffiliationType.Ally)">متحد/هم‌پیمان</option> <option value="@((int)PersonAffiliationType.Ally)">متحد/هم‌پیمان</option>
<option value="@((int)PersonAffiliationType.Rival)">رقیب/دشمن</option> <option value="@((int)PersonAffiliationType.Rival)">رقیب/دشمن</option>
<option value="@((int)PersonAffiliationType.Companion)">همراه/همدم</option> <option value="@((int)PersonAffiliationType.Companion)">همراه/همدم</option>

View File

@ -113,6 +113,8 @@ namespace GanjooRazor.Pages
{ PersonAffiliationType.Servant, "خدمتکارِ" }, { PersonAffiliationType.Servant, "خدمتکارِ" },
{ PersonAffiliationType.Companion, "همراهِ" }, { PersonAffiliationType.Companion, "همراهِ" },
{ PersonAffiliationType.Successor, "جانشینِ" }, { PersonAffiliationType.Successor, "جانشینِ" },
{ PersonAffiliationType.Panegyrized, "مدح‌گویِ" },
{ PersonAffiliationType.Satirized, "هجوگویِ" },
{ PersonAffiliationType.Other, "دارای نسبتی (به یادداشت نگاه کنید) با" }, { PersonAffiliationType.Other, "دارای نسبتی (به یادداشت نگاه کنید) با" },
}; };

View File

@ -8,7 +8,7 @@
// person2Id, person2Name, category, typeValue, degreeHint, note}] } where category is // person2Id, person2Name, category, typeValue, degreeHint, note}] } where category is
// "Relation" (typeValue is PersonRelationType: 0=Parent,1=Sibling,2=Spouse,3=Ancestor) or // "Relation" (typeValue is PersonRelationType: 0=Parent,1=Sibling,2=Spouse,3=Ancestor) or
// "Affiliation" (typeValue is PersonAffiliationType: 0=Minister,1=Advisor,2=Courtier,3=Patron, // "Affiliation" (typeValue is PersonAffiliationType: 0=Minister,1=Advisor,2=Courtier,3=Patron,
// 4=Ally,5=Rival,6=Servant,7=Companion,8=Successor,99=Other). directlyTagged is false only on // 4=Ally,5=Rival,6=Servant,7=Companion,8=Successor,9=Panegyrized,10=Satirized,99=Other). directlyTagged is false only on
// the category-scoped graph (GET api/ganjoor/cat/{id}/persongraph, the "characters in this work" // the category-scoped graph (GET api/ganjoor/cat/{id}/persongraph, the "characters in this work"
// tab): such a node was pulled in as a one-hop relative/affiliate of someone actually named in the // tab): such a node was pulled in as a one-hop relative/affiliate of someone actually named in the
// work's verses, and is never false on the whole-site graph fed by PeopleExplorer.cshtml. // work's verses, and is never false on the whole-site graph fed by PeopleExplorer.cshtml.
@ -46,6 +46,8 @@
'Affiliation:6': { label: 'خدمتکار', color: '#c07a2b', directional: true }, 'Affiliation:6': { label: 'خدمتکار', color: '#c07a2b', directional: true },
'Affiliation:7': { label: 'همراه', color: '#5aa08a', directional: false }, 'Affiliation:7': { label: 'همراه', color: '#5aa08a', directional: false },
'Affiliation:8': { label: 'جانشین', color: '#8a4ac0', directional: true }, 'Affiliation:8': { label: 'جانشین', color: '#8a4ac0', directional: true },
'Affiliation:9': { label: 'مدح‌گو', color: '#b08a2a', directional: true },
'Affiliation:10': { label: 'هجوگو', color: '#7a3a9a', directional: true },
'Affiliation:99': { label: 'سایر', color: '#888888', directional: false } 'Affiliation:99': { label: 'سایر', color: '#888888', directional: false }
}; };

View File

@ -58,6 +58,18 @@ namespace RMuseum.Models.Ganjoor
/// </summary> /// </summary>
Successor = 8, Successor = 8,
/// <summary>
/// Person1 (a poet) wrote panegyric/praise poetry (قصیدهٔ مدح) about Person2 (the ممدوح -
/// the praised patron/king/dignitary) - directional, same convention as Minister/Patron
/// </summary>
Panegyrized = 9,
/// <summary>
/// Person1 (a poet) wrote satirical/mocking poetry (هجو) about Person2 (the هجو شده -
/// the satire's target) - directional, same convention as Minister/Patron
/// </summary>
Satirized = 10,
/// <summary> /// <summary>
/// doesn't fit any of the above - rely on Note for what the tie actually is /// doesn't fit any of the above - rely on Note for what the tie actually is
/// </summary> /// </summary>

View File

@ -11856,6 +11856,18 @@
came after) came after)
</summary> </summary>
</member> </member>
<member name="F:RMuseum.Models.Ganjoor.PersonAffiliationType.Panegyrized">
<summary>
Person1 (a poet) wrote panegyric/praise poetry (قصیدهٔ مدح) about Person2 (the ممدوح -
the praised patron/king/dignitary) - directional, same convention as Minister/Patron
</summary>
</member>
<member name="F:RMuseum.Models.Ganjoor.PersonAffiliationType.Satirized">
<summary>
Person1 (a poet) wrote satirical/mocking poetry (هجو) about Person2 (the هجو شده -
the satire's target) - directional, same convention as Minister/Patron
</summary>
</member>
<member name="F:RMuseum.Models.Ganjoor.PersonAffiliationType.Other"> <member name="F:RMuseum.Models.Ganjoor.PersonAffiliationType.Other">
<summary> <summary>
doesn't fit any of the above - rely on Note for what the tie actually is doesn't fit any of the above - rely on Note for what the tie actually is